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

    HAProxy and SSL Passthrough

    Scheduled Pinned Locked Moved Cache/Proxy
    7 Posts 4 Posters 4.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.
    • A
      AndroBourne
      last edited by

      Hello all,

      I've been trying to get HAProxy with SSL Passthrough working for the last few days now and it doesn't seem to matter what combination of settings I use. I'm unable to get it to function. This is what I'm trying to achieve. I have one IIS Server with ports 80 and 443 open. Websites are working fine via IIS Bindings. I'm currently trying to set up 2 additional app servers that also need 80 and 443 open. Hence a conflict in ports. So I'm trying to implement HAProxy on my PFSense but only have it in SSL Passthrough mode as SSL Certs will be handled locally on each host. I also dont want to have the certs on HAProxy. I want to just pass the SSL traffic through HAProxy and let localhost manage its own SSL Certs.

      Here is my current setup. (blue blurred out marks is the domain being redacted)

      Backend: Since we are doing SSL Passthrough no encrypt or SSL checks should be on from my understanding. I've tried playing with them on and off and it makes no difference.
      a16a9710-193d-4755-9d96-1a574e49ca36-image.png

      Frontend: Type is changed from HTTPS to TCP which is required for SSL Passthrough from my understanding. I've tried using HTTPS, TCP and TCP mode. The most success I've had was with TCP but still receive a 503 error and its unable to connect to "host" it doesn't seem to be passing through to the SSL cert.
      5a7ffa06-ee0e-4422-98a9-8ce5561c9863-image.png

      860ad904-42aa-4456-80a6-f1bc04fd6133-image.png

      I then changed the local firewall policy to remove 80 and 443 from 10.10.10.3 (web server) to the local firewall instead AKA made a new HAProxy policy and disabled the old policy. And receive 503 error. pages shows connection is not reaching the host server.

      I made sure my local firewall wasn't using 80 or 443 for firewall GUI. I tried playing with Rules and changing types from SSL/HTTPS (TCP MODE) to just TCP. I try changing backend settings to allow and not allow SSL offloading and with or without encryption enabled. No matter what settings I do, I can not get the traffic to route through HAProxy but it works if I switch the rules back to forward 80 and 443 directly back to web server host 10.10.10.3 but thats not going through HAPRoxy.

      Anyone have any ideas how what else I can check to resolve this issue? I'm completely out of ideas.

      C 1 Reply Last reply Reply Quote 0
      • C
        CrowFather @AndroBourne
        last edited by

        @androbourne Try changing your ACL expression to "host starts with" and make the value the FQDN of your domain.

        A 1 Reply Last reply Reply Quote 0
        • A
          AndroBourne @CrowFather
          last edited by AndroBourne

          @crowfather That is not a valid option when in TCP or TCP Mode...

          That option is only available in HTTP, not TCP mode. And you can't do SSL Passthrough in HTTP mode...

          TCP
          108d2827-e271-43be-a6d3-bbc11ea5b990-image.png

          And TCP mode
          ff2e99f6-67be-49fc-87e5-ea3e78ff7fc7-image.png

          I've tried using Traffic is HTTP and Traffic is SSL also tried TCP Mode with expression in original post.

          1 Reply Last reply Reply Quote 0
          • B
            breezytm
            last edited by

            I am going through the same problem as well. While I am fairly new to HAProxy, I've been at this for days now without any success either. I wonder if someone with more experience in this can shed some light on how to accomplish this.

            1 Reply Last reply Reply Quote 0
            • S
              sgnoc
              last edited by

              Not to revive an older thread, just wondering if @AndroBourne or @breezytm got a ssl passthrough solution working? I have a similar setup I am trying to get functional where a first frontend is using tcp mode for ssl passthrough to a second ssl passthrough that does ssl offloading. Hoping either of you figured out something that is working. Thanks!

              B 1 Reply Last reply Reply Quote 0
              • B
                breezytm @sgnoc
                last edited by

                @sgnoc I was not able to set it up. Reference documents are limited.

                S 1 Reply Last reply Reply Quote 0
                • S
                  sgnoc @breezytm
                  last edited by

                  @breezytm Thank for the reply. I finally was able to get it working after I found one site that provided some reference configurations. Here is my post on the netgate forum if you are still looking for a solution.

                  https://forum.netgate.com/topic/174705/haproxy-ssl-offloading-openvpn-ssh

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.