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

    Forward based on hostname

    Scheduled Pinned Locked Moved Firewalling
    3 Posts 2 Posters 4.4k 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.
    • J
      jkstraw
      last edited by

      Hi,

      Sorry if this has been covered - I have been looking through the forums for awhile because it seems like it should be a common request.

      I would like to get a number of web servers running on my internal network (NAT).  But only have a single public IP address for my WAN interface.

      If a external user requets "http://www.server1.com" I would like to get it to port 80 on "server1" and if they type in "http://www.server2.com" have it forward to port 80 on "server2" and so on.  From the NAT menu I can only see how to do this using different ports - ie. server1 on TCP-80 and server2 on TCP-8080.  To complicate things a bit I also have some Apache servers running Virtual Hosts (based on hostname).

      My DNS is setup to point all A records to the public (WAN) IP address.

      Again - sorry if this has been covered.

      Thanks,

      jk

      1 Reply Last reply Reply Quote 0
      • R
        rsw686
        last edited by

        Pfsense can't do this. You would have to work this out with apache. Either put all the websites on the same server, or I think you could use the apache proxy module to grab the pages and from the correct server and act as the middleman.

        1 Reply Last reply Reply Quote 0
        • J
          jkstraw
          last edited by

          Thank you for the quick reply.

          I think I will just install Pound (http://www.apsis.ch/pound/) at a central point and forward all web traffic to it for redistribution based on requested URL.

          Again - thank you for the quick reply :-)

          If I ever learn how to create packages I will attempt a pound package.

          Cheers,

          jk

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