Certificate for Ubuntu Azure VM

I'm trying to create a cert for an Ubuntu 20.04 machine on Azure (to be used with Jupyter server). Only port 22, 80, and 443 are open. I need to run my server on https, to be able to integrate with it. I checked nothing is running on 80 or 443 with sudo ss -tuln | grep ':80' and sudo ss -tuln | grep ':443'. Still I get an error with the challenge. I'm able to connect with the Jupyter server when it runs on 80, and I can also start the dummy Python server and connect, but Let's Encrypt doesn't seem able for some reason.

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is: jupyternow.eastus.cloudapp.azure.com (auto-generated, can be resolved from a remote machine)

I ran this command:

It produced this output:
sudo certbot certonly --standalone -d jupyternow.eastus.cloudapp.azure.com
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator standalone, Installer None
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for jupyternow.eastus.cloudapp.azure.com
Waiting for verification...
Challenge failed for domain jupyternow.eastus.cloudapp.azure.com
http-01 challenge for jupyternow.eastus.cloudapp.azure.com
Cleaning up challenges
Some challenges have failed.

IMPORTANT NOTES:

  • The following errors were reported by the server:

    Domain: jupyternow.eastus.cloudapp.azure.com
    Type: connection
    Detail: 20.62.200.55: Fetching
    http://jupyternow.eastus.cloudapp.azure.com/.well-known/acme-challenge/Kz97Vk1bq7b_V9Gu9q0bpGWvc3lIHqumRUgxFyzCGxo:
    Timeout during connect (likely firewall problem)

    To fix these errors, please make sure that your domain name was
    entered correctly and the DNS A/AAAA record(s) for that domain
    contain(s) the right IP address. Additionally, please check that
    your computer has a publicly routable IP address and that no
    firewalls are preventing the server from communicating with the
    client. If you're using the webroot plugin, you should also verify
    that you are serving files from the webroot path you provided.

My web server is (include version): standalone

The operating system my web server runs on is (include version): Ubuntu 20.04

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 (sudo)

I'm using a control panel to manage my site (no, or provide the name and version of the control panel): no

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): 0.40.0

Are you testing the connection from the public internet? Or just on your local machine or network?

Because the error from Let's Encrypt server is pretty clear there is a problem connecting.

If you can connect from the public internet locally could there be a firewall blocking specific IP?

3 Likes

Remember to open the ports in the azure networking settings for your server, and they have to allow public access.

3 Likes

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