Letsencrypt in Azure


When attempting to set up letsencrypt in azure it fails because its using the internal IP of the site rather than the external IP to authenticate the cert, how do I force letsencrypt to use the external IP rather than the internal one?

Please fill out the fields below so we can help you better.

My domain is: betterbanking.tech

I ran this command:
letsencrypt --apache -d betterbanking.tech -d www.betterbanking.tech
It produced this output:
The following errors were reported by the server:

Domain: betterbanking.tech
Type: connection
Detail: Failed to connect to for tls-sni-01

My operating system is (include version):
Ubuntu 16.04
My web server is (include version):
Apache/2.4.18 (Ubuntu)
My hosting provider, if applicable, is:
I can login to a root shell on my machine (yes or no, or I don’t know):
I’m using a control panel to manage my site (no, or provide the name and version of the control panel):


Hi @flemineo,

The Certbot client (the new name for letsencrypt) tries to listen on every IP address. So if incoming connections don’t reach it, you’ll need to configure firewall rules to allow them to.

Are you sure that the internal address is being used at all? The address you posted above is a public address, not a private address.


Hi there Schoen, sorry I should have said interface rather than ip address - that’s the internal interface. The external one is what the URL resolves to dns wise - that’s just an artifact of the way azure works :slight_smile:

Is there any way to force certbot to use a particular interface/ip?


I don’t think so. How do you know it’s not listening on the external one?


Hi there,

The external interface is a 13.x.x.x address which is what the DNS actually resolves to so it’s definitely not trying it I think.


In this case you have a discrepancy between the DNS settings for betterbanking.tech and www.betterbanking.tech! They point to different IP addresses.


http://betterbanking.tech/ seems to be using the Namecheap URL forwarding server.


You could actually still get a certificate for it with DNS-01 or HTTP-01 validation, though you probably couldn’t use the certificate.

If you want to be able to use HTTPS, you should change betterbanking.tech to a regular A record. You could configure your own web server to send the HTTP redirect.


Hi folks,

Will give that a try and report back.



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