AWS EC2 : Certificate issued against internal IP


#1

Hi,

I used certbot-auto to create ssl certificate for my web server running on AWS EX2 Fedora 23 server. When I access the https site, the browser is showing the following error:

www.xxxx.com uses an invalid security certificate. The certificate is not trusted because it is self-signed. The certificate is only valid for ip-10-0-0-29.us-west-2.compute.internal Error code: SEC_ERROR_UNKNOWN_ISSUER

So, it looks like the certificate is issued against the private IP. When I do the nslookup on the server, it is showing the same private IP, and the public IP is visible only through metadata.

How can I get the certificate issued against the public IP? Is there any way I can change the configuration?

PS: the command I used is: sudo ./certbot-auto --authenticator standalone --installer apache -w /var/www/html -d www…


#2

The certificate will have been issued for the domain name you specified on the command line ( not for a specific IP address )

Has the certificate been installed correctly ?

We can check more easily if you could provide your domain name please ( it’s made public as soon as a certificate is issued anyway )


#3

That’s not your Let’s Encrypt certificate. You say you used certbot to create a certificate, but did you actually install it?


#4

Thanks for the responses.

The domain is www.sensimple.com

I thought the command when used along with --installer will take care of the installation as well. Am I missing something?


#5

It looks like your using a self signed cert. If you have a cert that’s issued by Lets Encrypt your not using it.


#6

You are right! it is using the self signed certificate. Thanks a lot!

Server Certificate:

Point SSLCertificateFile at a PEM encoded certificate. If

the certificate is encrypted, then you will be prompted for a

pass phrase. Note that a kill -HUP will prompt again. A new

certificate can be generated using the genkey(1) command.

SSLCertificateFile /etc/pki/tls/certs/localhost.crt

Server Private Key:

If the key is not combined with the certificate, use this

directive to point at the key file. Keep in mind that if

you’ve both a RSA and a DSA private key you can configure

both in parallel (to also allow the use of DSA ciphers, etc.)

SSLCertificateKeyFile /etc/pki/tls/private/localhost.key


#7

Thanks lart, tialaramex. Installing the certificate solved the problem.

Thanks to the user guide https://certbot.eff.org/docs/using.html#where-are-my-certificates for no-nonsense information as well.


#8

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.