Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
General Discussion
»
Name resolution that includes port number?
« previous
next »
Print
Pages: [
1
]
Author
Topic: Name resolution that includes port number? (Read 1115 times)
Sar6e
Newbie
Posts: 6
Karma: 0
Name resolution that includes port number?
«
on:
September 09, 2022, 01:28:17 am »
I'd like to not have to remember all the port numbers for the various docker containers running on a single host. Ideally I'd be able to type "service.server.domain" and have the DNS be able to resolve that to ip:port.
For example if my wiki is exposed as port 9082 on the server fred at hb.com at 192.168.1.100, it would be great to just type wiki.fred.hb.com and have that resolve to 192.168.1.100:9082 rather than having to remember which port the wiki uses.
Is there a way to achieve this or am I dreaming?
Logged
bartjsmit
Hero Member
Posts: 1999
Karma: 193
Re: Name resolution that includes port number?
«
Reply #1 on:
September 09, 2022, 07:54:50 am »
You mean a SRV record?
https://en.wikipedia.org/wiki/SRV_record
Logged
Bob.Dig
Sr. Member
Posts: 253
Karma: 13
Re: Name resolution that includes port number?
«
Reply #2 on:
September 09, 2022, 08:04:48 am »
It is called reverse proxy.
Logged
Sar6e
Newbie
Posts: 6
Karma: 0
Re: Name resolution that includes port number?
«
Reply #3 on:
September 13, 2022, 12:38:49 am »
Quote from: bartjsmit on September 09, 2022, 07:54:50 am
You mean a SRV record?
https://en.wikipedia.org/wiki/SRV_record
Thanks for the reply. Looking at that wikipedia entry, I think so. I found an old reddit thread which suggests srv records can be added to the "Custom Option" in Unbound DNS. I'm not seeing that option any more in the general settings page of the Unbound DNS Service so things may have changed.
At least though it gives me a search term to investigate further. I find half the battle is working out what the thing you need is called. I want to say I used to be able to create an alias in Sophos UTM...
Logged
meyergru
Hero Member
Posts: 1633
Karma: 163
IT Aficionado
Re: Name resolution that includes port number?
«
Reply #4 on:
September 13, 2022, 10:31:36 am »
No browser can interpret SRV records. But the approch of using HA-Proxy as a frontend is viable.
You could hide all docker containers behind one IP with several names and have HA-Proxy do the distribution to different docker backends.
Logged
Intel N100, 4 x I226-V, 16 GByte, 256 GByte NVME, ZTE F6005
1100 down / 440 up
,
Bufferbloat A+
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
General Discussion
»
Name resolution that includes port number?