May 28, 2021 07:21 pm GMT
Original Link: https://dev.to/manishfoodtechs/is-it-possible-to-have-ssl-certificate-for-ip-address-not-domain-name-answer-is-yes-519o
Is it possible to have ssl certificate for ip address not domain name? Answer is YES :)
"To be concise, here is how to generate an individual self signed SAN certificate with IP addresses. Expand the IP list to include your entire subnet and use one cert for everything."
As said by https://stackoverflow.com/users/3421482/josiah-dewitt
#!/bin/bash#using: OpenSSL 1.1.1c FIPS 28 May 2019 / CentOS Linux release 8.2.2004C=US ; ST=Confusion ; L=Anywhere ; O=Private\ Subnet ; [email protected]=2048CN=RFC1918DOM=company.comSUBJ="/C=$C/ST=$ST/L=$L/O=$O/CN=$CN.$DOM"openssl genrsa -out ip.key $BITSSAN='
[SAN]
subjectAltName=IP:192.168.1.0,IP:192.168.1.1,IP:192.168.1.2,IP:192.168.1.3,IP:192.168.1.4,IP:192.168.1.5,IP:192.168.1.6,IP:192.168.1.7,IP:192.168.1.8,IP:192.168.1.9,IP:192.168.1.10'cp /etc/pki/tls/openssl.cnf /tmp/openssl.cnfecho -e "$SAN" >> /tmp/openssl.cnfopenssl req -subj "$SUBJ" -new -x509 -days 10950 \ -key ip.key -out ip.crt -batch \ -set_serial 168933982 \ -config /tmp/openssl.cnf \ -extensions SANopenssl x509 -in ip.crt -noout -text
$DOM is Domain (Incase you need)
Refer to https://stackoverflow.com/questions/2043617/is-it-possible-to-have-ssl-certificate-for-ip-address-not-domain-name#:~:text=An%20SSL%20certificate%20is%20typically,Certificate%20Signing%20Request%20(CSR).
THE END
Original Link: https://dev.to/manishfoodtechs/is-it-possible-to-have-ssl-certificate-for-ip-address-not-domain-name-answer-is-yes-519o
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To