Hi, I was trying to install SSL for one of my domains. Our hosting providers allows connections only from UAE. So I asked them to enable connection from US to make it possible for certbot to access my server. After that I get this error. So it will be really helpful to get the country which I should allow access to my server to get the certificate installed.
Hint: The Certificate Authority failed to verify the temporary nginx configuration changes made by Certbot. Ensure the listed domains point to this nginx server and that it is accessible from the internet.
My web server is (include version): nginx
The operating system my web server runs on is (include version): Ubuntu 20
My hosting provider, if applicable, is: Local one
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
The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): 1.28.0
Let's Encrypt uses multi-perspective domain validation from around the globe, so an exemption for just the USA (the origin of Let's Encrypt) won't be enough.
It would be a better idea to globally allow requests for the path /.well-known/acme-challenge/ which should not be a security risk (nothing should be present at that location except for validation tokens). Alternatively you might be able to use the dns-01 challenge, if your DNS servers aren't affected by these strict rules from your hosting provider.
If acme.sh lists a DNS plugin for your DNS provider, but Certbot does not, you might be able to make the acme.sh DNS plugin compatible with the --manual-auth-hook and --manual-cleanup-hook of Certbot or switch over to acme.sh entirely. Note that acme.sh defaults to ZeroSSL as CA, although it does have an option to use Let's Encrypt as the CA using the (I believe) --server option.
Note that certbot renew won't work with the manual plugin without the aformentioned hooks as you've done now. The only way to renew using this very literal manual method is to run the same command again over 60 days (and so forth).
An alternative solution could be to use free DNS by e.g. Cloudflare and add a NS resource record for the required _acme-challenge label to the Cloudflare nameservers. There's a DNS plugin for Cloudflare DNS. Or use e.g. acme-dns, which has Certbot integration using a script.