1 (edited by johnavitable 2019-05-11 03:46:33)

Topic: certbot connection refused

- iRedMail version (check /etc/iredmail-release): v0.9.9
- Deployed with iRedMail Easy or the downloadable installer? downloadable installer
- Linux/BSD distribution name and version: CentOS 7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): PGSQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? no
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.

I'm trying to set up a certificate with certbot and when I run the command suggested in the installer, certbot fails because the default nginx config doesn't allow a connection over HTTP as opposed to HTTPS. Below is what certbot returns, does anyone have any advice?

[root@mx1 sites-enabled]# certbot certonly --webroot --dry-run -w /var/www/html -d mx1.domain.tld
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer None
Starting new HTTPS connection (1): acme-staging-v02.api.letsencrypt.org
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for mx1.domain.tld
Using the webroot path /var/www/html for all unmatched domains.
Waiting for verification...
Cleaning up challenges
Failed authorization procedure. mx1.domain.tld (http-01): urn:ietf:params:acme:error:connection :: The server could not connect to the client to verify the domain :: Fetching http://mx1.domain.tld/.well-known/acme- … pN97ez0As: Connection refused

- The following errors were reported by the server:

   Domain: mx1.domain.tld
   Type:   connection
   Detail: Fetching
   http://mx1.domain.tld/.well-known/acme- … pN97ez0As:
   Connection refused

   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.


Re: certbot connection refused

- Nginx configured by iRedMail accepts connections from 80 and 443.
- Do you have any firewall that blocks http access? like iptables on iRedMail server, or a firewall device in your LAN. If you're running iRedMail on a VPS hosted by some VPS vendor, does the VPS vendor have some default firewall rule  that blocks port 80?


Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee