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

    Reverse proxy step by step request

    Cache/Proxy
    3
    4
    5.4k
    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.
    • N
      nonyhaha
      last edited by nonyhaha

      Hello dear pfSense users.

      I am trying these days to setup a reverse proxy on my pfSense running in a virtual machine.
      pfSense is working great, port forwarding is working great for over one year now.

      I tried a few tutorial found online but none of them are really working as they should. Like, they do not resolve anything.

      Could anybody help me with frontend page editing on HAProxy for the reverse to work? Or with Squid reverse proxy setup if that sounds easier?

      What I know:
      My external domain (dynamic ip): "example.com" - this is already working, I can access redirected ports on this address.
      Internal servers:
      server1: "internal ip1":"port number1"
      server2 "internal ip1":"port number2"/web
      server3: "internal ip2":"port number3"

      What I want:
      Redirect "server1.example.com" to "internal ip1":"port number1"
      Redirect "server2.example.com" to "internal ip1":"port number2"/web
      Redirect "server3.example.com" to "internal ip2":"port number3"

      I am not using SSL. I just want simple redirects from port 80 to different servers/ports on the internal network.

      I followed these tutorials until now:
      https://travellingtechguy.eu/reverse-proxy-with-pfsense-and-squid/
      https://www.reddit.com/r/homelab/comments/2vyiiy/til_reverse_proxy_via_squid_in_pfsense/
      Others too.

      The problem is that none of these have all the details included. As I was not able to achieve the end result wanted.

      I did set the rule to allow port 80 traffic in the firewall.
      I setup pfsense admin page on another port (other than 80).

      In HAproxy I configure backend and frontend, but only the direct "example.com" will redirect to its routing rule. All other "server*.example.com" will fail.
      Thanks in advance.

      hawkbhH 1 Reply Last reply Reply Quote 1
      • hawkbhH
        hawkbh @nonyhaha
        last edited by

        @nonyhaha have you got how to resolve your problem? I am trying to publish some sites too! I found this tutorial https://www.danielcolomb.com/2019/09/15/using-squid-reverse-proxy-to-manage-multiple-domain-names-on-pfsense/ but I have not to figure out how to make it works.

        1 Reply Last reply Reply Quote 0
        • aluiscoA
          aluisco
          last edited by

          Hello,

          I already make a inverse proxy with SQUID without any issues, the post is quite old, if need help please reply to this message and I will put the solution here.

          Regards,
          Aluisco

          1 Reply Last reply Reply Quote 0
          • N
            nonyhaha
            last edited by

            I am sorry to reply so late to this, but I did not access the forums for a long while because I did not have any notification about it.
            I managed to make haproxy work perfect only by moving to ssl redirect on haproxy and adding letsencrypt certificates to the server.
            I did not manage to make it work without ssl.
            This is anyway better practice, as traffic is encrypted and browsers and other devices will trust my servers.

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