openwrt login 1curl -XPOST curl --location -v --request POST 'https://10-233-76-144.default.pod.cluster.local/cgi-bin/luci/?luci_username=root&luci_password=root1' --cacert ./ca.pem 2 3 # Cert is the cnf-default-cert, must use the h 4curl --location -v --request POST 'https://10-233-76-144.default.pod.cluster.local/cgi-bin/luci/' \ 5--header 'Content-Type: application/x-www-form-urlencoded' \ 6--data-urlencode 'luci_username=root' \ 7--data-urlencode 'luci_password=root1' \ 8--cacert ./ca.pem Create CSR
1curl -XGET 'https://10-233-76-144.default.pod.cluster.local/cgi-bin/luci/sdewan/nat/v1/nats' --cacert ./ca.pem 1curl -XGET 'https://10-233-76-144.default.pod.cluster.local/cgi-bin/luci/sdewan/pkcs11/v1/crs' --cacert ./ca.pem 1#!/bin/bash 2 3set -x 4 5cnf_ip="10-233-76-144.default.pod.cluster.local" 6cert_label="node-1" 7cert_subject="/CN=node-1" 8 9# you alway a same csr, even you try many times 10curl --location --request POST "https://${cnf_ip}/cgi-bin/luci/sdewan/pkcs11/v1/crs" \ 11--header 'Content-Type: application/json' \ 12--data-raw "{ 13 \"cert\": { 14 \"key_pair\": { 15 \"key_type\": \"rsa:2048\", 16 \"label\": \"${cert_label}\", 17 \"id\": \"0001\" 18 }, 19 \"subject\": \"${cert_subject}\", 20 \"pem\": \"\" 21 } 22}" --cert ca.