• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

Certbot verification issues on webserver behind NAT

Scheduled Pinned Locked Moved NAT
4 Posts 2 Posters 1.8k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H
    helloha
    last edited by helloha Oct 2, 2021, 7:33 PM Oct 2, 2021, 7:33 PM

    Hi all,

    Switched to pfsense last week and things run fine. Have a small webserver that is reachable with a no-ip domain.

    However now I have issues renewing my https certificate via the cerbot script.

    Any idea what could cause this? It mentions the firewall but I can't turn it off on pfsense to test without disabling NAT?

    Thx!

    Select the appropriate numbers separated by commas and/or spaces, or leave input
    blank to select all options shown (Enter 'c' to cancel): 1
    Cert is due for renewal, auto-renewing...
    Renewing an existing certificate for xxxx.ddns.net
    Performing the following challenges:
    http-01 challenge for xxxxx.ddns.net
    Waiting for verification...
    Challenge failed for domain xxx.ddns.net
    http-01 challenge for xxx.ddns.net
    Cleaning up challenges
    Some challenges have failed.
    
    IMPORTANT NOTES:
     - The following errors were reported by the server:
    
       Domain: xxxxx.ddns.net
       Type:   connection
       Detail: Fetching
       http://xxxxx.ddns.net/.well-known/acme-challenge/jQ0FAbIxSG49Zc0apfcfvPZLQARMAm-W_off0MvKF68:
       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.
    
    G 1 Reply Last reply Oct 4, 2021, 7:41 AM Reply Quote 0
    • G
      Gertjan @helloha
      last edited by Oct 4, 2021, 7:41 AM

      @helloha said in Certbot verification issues on webserver behind NAT:

      Any idea what could cause this?

      The Most plausible issues are mentioned.

      Do you know what NAT is ?
      Did you test it ?

      This :

      http://xxxxx.ddns.net/
      

      Does "xxxxx.ddns.net" resolve to your WAN IP ?
      if so, traffic should hit your WAN interface. Did the traffic arrive at the WAN port ? Did it arrive at the web server ? Was the 'hidden' directory ".well-known" created in the server's web root ? was their a sub directory created, called acme-challenge ? Was their a file called jQ0FAbIxSG49Zc0apfcfvPZLQARMAm-W_off0MvKF68 ?

      No "help me" PM's please. Use the forum, the community will thank you.
      Edit : and where are the logs ??

      H 1 Reply Last reply Oct 4, 2021, 3:34 PM Reply Quote 0
      • H
        helloha @Gertjan
        last edited by Oct 4, 2021, 3:34 PM

        @gertjan

        Thanks,

        Got it fixed. I redirected port 80 to 443 because I didn't want to allow HTTP. I did not know that certbot and lets encrypt need port 80 for their verification...

        G 1 Reply Last reply Oct 5, 2021, 7:29 AM Reply Quote 0
        • G
          Gertjan @helloha
          last edited by Oct 5, 2021, 7:29 AM

          @helloha said in Certbot verification issues on webserver behind NAT:

          I redirected port 80 to 443

          It can't work like that.
          (any) http request (over port 80) will fail, as http - clear http requests - will not understand the TLS type reply coming from a typical TLS web server instance.

          So port 80 redirects to the http instance of a web server.
          Port 443 redirects to the https instance of a web server.
          So, typically, you have always two instances of the web server running, one for each type.
          The port 80 type is often redirecting all the traffic to the https version, only if (example) the requested file path doesn't contain ".well-known".

          Details of the "http-01 challenge" challenge : https://letsencrypt.org/docs/challenge-types/
          You'll discover that http://xxx.ddns.net:80 can get redirected to https://xxx.ddns.net:443, this is something else as mapping port 80 to 443.

          No "help me" PM's please. Use the forum, the community will thank you.
          Edit : and where are the logs ??

          1 Reply Last reply Reply Quote 0
          4 out of 4
          • First post
            4/4
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
            This community forum collects and processes your personal information.
            consent.not_received