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

    HAProxy - exposed admin login

    Cache/Proxy
    2
    6
    1.2k
    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
      ak
      last edited by

      I setup HAProxy listening on port 80 and 443. I port forwarded the adsl modem to these ports. Website etc was working fine.

      I had to change out the ADSL modem today, so connected a new modem up, port forwarded 80 and 443 to 80 and 443 on the pfsense server. However, I surf to the web address and the pfsense admin login screen is shown.

      How comes the web config is bound to the WAN address? Should I have HAProxy listen on something other than 80 and 443? Is there some race condition for the use of port 80 and 443 between the web admin and haproxy to explain why it was working before?

      1 Reply Last reply Reply Quote 0
      • D
        doktornotor Banned
        last edited by

        @ak:

        Should I have HAProxy listen on something other than 80 and 443?

        No, you should have the webGUI listen on something else.

        1 Reply Last reply Reply Quote 0
        • A
          ak
          last edited by

          Thanks - hoping there was a way to not bind the web gui to the wan interface. Minor quirk but it was quite nice accessing the gui on https on the lan via an internal URL without having to specify another port.

          1 Reply Last reply Reply Quote 0
          • D
            doktornotor Banned
            last edited by

            And you can still do that with HAproxy. Put another frontend on your LAN. Doing it all the time.



            1 Reply Last reply Reply Quote 0
            • A
              ak
              last edited by

              Awesome and ingenious. Thanks

              1 Reply Last reply Reply Quote 0
              • A
                ak
                last edited by

                To help anyone else who googles a similar issue - I set this all up and it was failing on HAProxy health check and wouldn't work. Digging around, googling, viewing the log etc, I finally noticed that the logs shows (for the health check after turning logging on for this).

                ….....is DOWN, reason: Layer7 wrong status, code: 405, info: "Not Allowed"

                Googled and then realised that the code 405 is a HTTP code, and HTTP 405 is "Method Not Allowed".

                I changed the health check HTTP check method from OPTIONS to a simple GET.

                This resolved it.

                Thanks again for to doktornotor for such a simple elegant solution.

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