Create Self-Signed Certificate With OpenSSL

by Oct 31, 2025IT Tips0 comments

This is the openssl command line showing how create a self signed cert with multiple hostnames and IP address.

Add the cert to your computers certificate rust store so your browser connects without security warnings.

openssl req -x509 -newkey rsa:4096 -keyout mydsm.toggen.lan.key.pem \
-out mydsm.toggen.lan.cert.pem -sha256 -days 3650 -nodes \
-subj "/C=AU/ST=Victoria/L=Melbourne/O=Toggen/OU=IT/CN=mydsm.toggen.lan" \
-addext 'subjectAltName = IP:10.19.14.80, DNS:mydsm.toggen.lan, DNS:mydsm'

# Remember to replace mysdsm.toggen.lan with your fully qualified domain name
# Adjust -subj /C=Country/ST=State/L=City/O=Organization/OU=OrganizationalUnti/CN=commonNameHostname
# Adjust IP: and the DNS: entries to match your settings too.

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.