Report this

What is the reason for this report?

Letsencrypt and Floating IP over HAProxy problem

Posted on October 5, 2018

Hi,

We have problem with challenge on Floating IP’s. Any help would be appreciated

Here are more info about it.

Server with HAProxy using acmetool listing on 402 as proxy. Both Public IP and Floating IP are assigned to HAProxy. On HAProxy request is proxied to 402 with acl (path_beg /.well-known/acme-challenge/ )

Public IP: 10.10.10.10 Floating IP: 20.20.20.20 (with anchor IP of 3.3.3.3)

domainA.com pointed to Public IP domainB.com pointed to Floating IP

Tests:

Both domainA.com and domainB.com is accessible on 80 and HAProxy proxies these to NGINX. So both domain is served over 80 with success.

domainA (on Public IP) SSL requests are signed with SUCCESS

domainB (on Floating IP) SSL requests are signed with FAILURE

Thanks



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hello,

It seems you’re having trouble with ACME challenges when your domain is pointed to a floating IP.

The ACME protocol, which is used by Let’s Encrypt, performs a check on the domain to ensure that you have control over it. When it fails, it’s typically because the ACME challenge request isn’t reaching your server or HAProxy isn’t routing it correctly.

Here are some things you could check or try:

  1. Check DNS Settings: Ensure that the DNS settings for domainB.com are correctly pointing to the Floating IP (20.20.20.20). It may take some time for DNS changes to propagate.

  2. Check Firewall Rules: Make sure there are no firewall rules blocking ACME challenge requests to the floating IP.

  3. Check HAProxy Logs: Inspect your HAProxy logs to see if requests for the ACME challenge (i.e., requests to domainB.com/.well-known/acme-challenge/) are coming in and whether they are being correctly proxied to your backend server.

  4. Check HAProxy Configuration: You might want to ensure your HAProxy is correctly configured to handle requests to domainB.com and route them to the backend server. Your acl and use_backend directives should look something like this:

  1. acl letsencrypt-acl path_beg /.well-known/acme-challenge/
  2. use_backend letsencrypt-backend if letsencrypt-acl
  1. Check acmetool Configuration: Make sure acmetool is configured to correctly respond to challenge requests for domainB.com.

  2. Test Without Floating IP: As a test, you might try pointing domainB.com to the public IP, similar to domainA.com, and see if it works. If it does, it indicates that the problem is likely related to the use of the floating IP.

Remember to restart HAProxy after making changes to its configuration.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.