Navigation

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

    Having two subdomains on one public IP address behind pFsense router

    DHCP and DNS
    2
    2
    283
    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
      netboy last edited by

      Hi there, I have netgate 2100.

      Right now I have my subdomain sub1.mydomain.com points to my home static IP.

      I have configure "google domains" under services -> dynamic dns clients as such:
      03639948-a972-4cbe-993f-635f5650794e-image.png

      I have set up my port forward using firewall -> NAT as follows:

      51d7d004-f421-4f27-a82f-1ccf785623b8-image.png

      All the above works fine.

      Now I want to have sub2.mydomain.com pointing to my static IP address (same as above) but forward it to my second server say 172.16.0.5 irrespective of the ports.

      I basically want some software (I remember I have used apache before) where it will examine the header and if sub1.mydomain.com forward to my "internal ip 172.16.0.xx" and if sub2.mydomain.com forward to my "internal ip 172.16.0.yy" irrespective of the ports

      Can I do this using pfsense? What is the best practice ?

      Any help would be appeciated

      S 1 Reply Last reply Reply Quote 0
      • S
        SteveITS Rebel Alliance @netboy last edited by

        @netboy You can’t forward the same port twice unless using either something like haproxy or an external load balancer.

        Only install packages for your version, or risk breaking it. If yours is older, select it in System/Update/Update Settings.
        When upgrading, let it finish. Allow 10-15 minutes, or more depending on packages and device speed.
        Upvote 👍 helpful posts!

        1 Reply Last reply Reply Quote 0
        • First post
          Last post