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

    Url based port forward

    Firewalling
    7
    10
    8.5k
    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.
    • M
      Mr.Fw
      last edited by

      Hi Everyone,

      I have 2 web servers that connected to same network.
      I need that when someone from the outside browse to a.domain.com will be forwarded to web server 1
      and when someone browse to b.domain.com will be forwarded to web server 2

      both of them using 2 different internal IPs
      and the port for both servers should be 80.

      is it possible to do that with pfsense?

      Thanks! :)

      Mr.Fw

      1 Reply Last reply Reply Quote 0
      • GruensFroeschliG
        GruensFroeschli
        last edited by

        No this is not possible with pfSense. (however i'm not sure if one of the available packages can add this functionality).

        But depending on which webserver you're using you might also be able to set up virtual domains and redirect internally from server to server.

        We do what we must, because we can.

        Asking questions the smart way: http://www.catb.org/esr/faqs/smart-questions.html

        1 Reply Last reply Reply Quote 0
        • M
          Mr.Fw
          last edited by

          the problem is that i use 2 different web servers.

          is it not possible to to that somehow with pfsense?
          maybe use some kind of a reverse proxy?

          1 Reply Last reply Reply Quote 0
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            I think the HAProxy package can do this, but it still has some rough edges.

            Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

            1 Reply Last reply Reply Quote 0
            • D
              DWAyotte
              last edited by

              you should go check out nginx.
              it is about the most simple reverse proxy in existance and it works beautifully.

              all you have to do is forward port 80 to nginx, create route rules based on the domain name to internal servers and done. it can offload any ssl processing as well, it can also reverse proxy folders, so you could have domin.com go to your webserver and domain.com/download go to your fileserver farm, etc etc.
              easiest thing to do is run in in VM like ESXi, takes little to no resources and is fast.

              1 Reply Last reply Reply Quote 0
              • ?
                Guest
                last edited by

                This should be solvable without anything fancy.  Each website is on its own unique IP?  Set up DNS and 1:1 NAT.  Problem solved.

                1 Reply Last reply Reply Quote 0
                • M
                  Mr.Fw
                  last edited by

                  @submicron:

                  This should be solvable without anything fancy.  Each website is on its own unique IP?  Set up DNS and 1:1 NAT.  Problem solved.

                  each website has its own unique internal ip,
                  but externally they're sharing one WAN ip.

                  Thanks  ;)

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

                    modsecurity package can do this.

                    1 Reply Last reply Reply Quote 0
                    • M
                      Mr.Fw
                      last edited by

                      Hi everyone,

                      its been a while..

                      anyway, i've installed the "modsecurity" package and this is what i get:

                      **Forbidden

                      You don't have permission to access /index.php on this server.**

                      nothing else was changed except for the package installation.

                      even after reboot - still the same.

                      please help me,
                      my dmz is offline  ???

                      1 Reply Last reply Reply Quote 0
                      • S
                        Steve Mustafa
                        last edited by

                        I've been having pretty much the same damned issue.

                        Its a shame seeing that something like this is not integrated tightly with PFsense as a firewall, that would make PFsense insanely awesome.

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