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

    DNS host override based on port

    Scheduled Pinned Locked Moved General pfSense Questions
    7 Posts 3 Posters 820 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.
    • crc_error_79C
      crc_error_79
      last edited by

      Hello, I have docker machine with multiple services.
      I would like to know if it is possible to map each service (port) with a friendly name

      Ex.
      192.168.120.8:8123 -> homeassistant.local_myhome
      192.168.120.8:5000 -> frigate.local_myhome
      192.168.120.8:8096 -> jellyfin.local_myhome

      etc.

      I used checked the host override but it allow to add a name only based on the IP

      Thanks

      johnpozJ 1 Reply Last reply Reply Quote 0
      • johnpozJ
        johnpoz LAYER 8 Global Moderator @crc_error_79
        last edited by

        @crc_error_79 dns can not map ports.

        you could use HA proxy to do a reverse proxy.. But prob be just simpler to create bookmarks to a fqdn that resolves to that IP and use the port or just use the IP and the port.

        Unless you have different people with different browsers where these users change all the time, you set a bookmark 1 time and your done.

        You can put this shortcut on your desktop if you want even, etc.

        Other option is to break out your dockers to use their own IP different than the hosts IP, etc.

        An intelligent man is sometimes forced to be drunk to spend time with his fools
        If you get confused: Listen to the Music Play
        Please don't Chat/PM me for help, unless mod related
        SG-4860 24.11 | Lab VMs 2.8, 24.11

        crc_error_79C 1 Reply Last reply Reply Quote 0
        • crc_error_79C
          crc_error_79 @johnpoz
          last edited by

          @johnpoz thanks for the reply.
          unfortunately, I have few users (my parents) but with different devices (phone, tablet, pc).
          My idea is to create something "on-server side" so they only have to type the name of the service they want to use.
          This way is easy for them since they are often in fight with tech 😅

          So with pfsense there is no way to map ip+port into a name?

          johnpozJ stephenw10S 2 Replies Last reply Reply Quote 0
          • johnpozJ
            johnpoz LAYER 8 Global Moderator @crc_error_79
            last edited by

            @crc_error_79 ah maybe you looking for something like this then

            https://heimdall.site/

            its an application dashboard, you can even run it in a docker ;)

            You can put links to all your applications there - then they only need to know to go to one place.

            I set up the docker as one of my first dockers on my nas.. For something to test dockers with.. Its pretty slick to be honest..

            example.jpg

            An intelligent man is sometimes forced to be drunk to spend time with his fools
            If you get confused: Listen to the Music Play
            Please don't Chat/PM me for help, unless mod related
            SG-4860 24.11 | Lab VMs 2.8, 24.11

            1 Reply Last reply Reply Quote 1
            • stephenw10S
              stephenw10 Netgate Administrator @crc_error_79
              last edited by

              @crc_error_79 said in DNS host override based on port:

              So with pfsense there is no way to map ip+port into a name?

              As far as I know you can only do that using an http redirect that can include the port in the url.
              So in pfSense that would mean using HAProxy.

              The other thing you could do is setup DNS overrides for each service to different local IP and then use port forwards to redirect them to the same IP on different ports.

              A separate container running on port 80 that just issues redirects based on hostname requests might be easiest.

              Steve

              crc_error_79C 1 Reply Last reply Reply Quote 1
              • crc_error_79C
                crc_error_79 @stephenw10
                last edited by

                @johnpoz thanks I didn't know heimdall, I will check it!

                @stephenw10 using different IP for each container could be an idea thanks! I take a look of how to do it ;)

                1 Reply Last reply Reply Quote 0
                • stephenw10S
                  stephenw10 Netgate Administrator
                  last edited by

                  If you can just use different IPs on each container, yeah that pretty much removes the problem.

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