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

    Beginner question about DNS (server1.mydomain.com, server2.mydomain.com)

    Scheduled Pinned Locked Moved DHCP and DNS
    2 Posts 2 Posters 1.7k 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.
    • M
      MarkProvanP
      last edited by

      I'm aware that you can set a DNS override - or something along those lines - so you can use the server name rather than the IP for the local network. However, what I want to do as well is to set it up so that from the internet, I can type in 'server1.mydomain.com, fileserver.mydomain.com, minecraft.mydomain.com etc) and each will connect to each different internal server, complete with full port forwarding.

      This is what I mean:

      'myfirewall.mydomain.com(:80 or :443)' in a web browser will go to the pfSense WebGUI.
      'myfirewall.mydomain.com(:22)' for firewall SSH.
      'myserver.mydomain.com(:80 or :443)' will go to the server WebGUI.
      'myserver.mydomain.com(:22) for server SSH.
      'computer1.mydomain.com(:3389)' for computer 1 RDP
      … and so on, but so I don't need to set lots of port forwards for each server.

      I can't find anything yet that fully answers this, but I'm sure it is possible do make it happen.

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

        That is not possible to do on a single IP for almost any other protocol but HTTP. By the time a client hits your firewall, you firewall has no idea what hostname they used to get there.

        To do it with HTTP on port 80, you can use a package like mod_security which can redirect based on hostname, because that is supported in the HTTP protocol.

        Other protocols don't (including HTTPS, mostly) don't have a way to distinguish based on hostname, so you can only have one port forwarded per IP address.

        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
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.