Odooers论坛

欢迎!

该社区面向专业人士和我们产品和服务的爱好者。
分享和讨论最好的内容和新的营销理念,建立您的专业形象,一起成为更好的营销人员。


0

https connection to iot box failed

形象
odoo
形象
丢弃
2 答案
0
形象
odoo
最佳答案

@qle 's answer is not right. You CAN have a trusted certificate for a local ip but what I am gonna explain here is how to create a self signed certificate for your iot box so that you can import later on to your browser.

First log into your iot box and create a self signed certificate for nginx:

cat << 'EOT' > /etc/ssl/san.cnf
[req]default_bits = 2048
distinguished_name = req_distinguished_name
req_extensions = req_ext
x509_extensions = v3_req
prompt = no
[req_distinguished_name]
countryName = XX
stateOrProvinceName = N/A
localityName = N/A
organizationName = YourName
commonName = OdooIoTBoxCertificate
[req_ext]
subjectAltName = @alt_names
[v3_req]
subjectAltName = @alt_names
[alt_names]
IP.1 = YOUR_IOTBOX_IP
EOT

openssl req -x509 -nodes -days 365000 -newkey rsa:2048 -keyout key.pem -out cert.pem -config /etc/ssl/san.cnf
mv cert.pem /etc/ssl/certs/iot.crt
mv key.pem /etc/ssl/private/iot.key

Add those certs to the iotbox nginx proxy and when ready navigate to the iotbox homepage, then your browser will complain but you can then export the cert and add it to the trusted root certificate. You will be able then to naviagate to https://YOUR_IOT_IP and it will be secure, 


形象
丢弃
0
形象
odoo
最佳答案

Hello,

You can't just 'enable' it.

A certificate is linked to a domain. So you can't have a trusted certificate to a local ip address...

You must have a dns to resolve a subdomain to your local ip address

形象
丢弃