Letsencrypt in Azure


#1

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 192.64.119.31:443 for tls-sni-01
challenge

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:
Azure
I can login to a root shell on my machine (yes or no, or I don’t know):
yes
I’m using a control panel to manage my site (no, or provide the name and version of the control panel):
No


#2

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.


#3

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?


#4

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


#5

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.


#6

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


#7

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

https://www.namecheap.com/support/knowledgebase/article.aspx/385/2237/how-do-i-set-up-a-url-redirect-for-a-domain

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.


#8

Hi folks,

Will give that a try and report back.

Thanks!!!


#9

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