DNS host override based on port
-
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 nameEx.
192.168.120.8:8123 -> homeassistant.local_myhome
192.168.120.8:5000 -> frigate.local_myhome
192.168.120.8:8096 -> jellyfin.local_myhomeetc.
I used checked the host override but it allow to add a name only based on the IP
Thanks
-
@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.
-
@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 techSo with pfsense there is no way to map ip+port into a name?
-
@crc_error_79 ah maybe you looking for something like this then
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..
-
@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
-
@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 ;)
-
If you can just use different IPs on each container, yeah that pretty much removes the problem.