2

I'm setting up DNS server for my home network. It contains plenty of machines but I have only one public IP so there's a lot of NAT, proxies etc. Many people find it difficult to memorize all services provided by it. So i was looking for some DNS record that would allow me to list all services available in the network. I found TXT but it seems to be a bit rough. More interesting option seems to be SRV record but I'm not really sure how it should be used.

If I'm providing lets say 5 tcp services - 3 www server, 1 ssh machine and 1 ftp server how SRV records should look like? Something like this?: ('im using bind9 server)

service.prot.host  class  RR  prio weigh port target
_tcp                IN    SRV    0 0    80    @    ; primary site
_tcp                IN    SRV    0 0    8081  site1
_tcp                IN    SRV    0 0    8082  site2
_tcp                IN    SRV    0 0    22    sshbox
_tcp                IN    SRV    0 0    23    ftp
;
_http._tcp          IN    SRV    0 0    80    @
_http._tcp          IN    SRV    0 0    8081  site1
_http._tcp          IN    SRV    0 0    8082  site2
_ssh._tcp           IN    SRV    0 0    22    sshbox
_ftp._tcp           IN    SRV    0 0    23    ftp
;
_tcp.site1          IN    SRV    0 0    8081  site1
_http._tcp.site1    IN    SRV    0 0    8081  site1
_tcp.site2          IN    SRV    0 0    8082  site2
_http._tcp.site2    IN    SRV    0 0    8082  site2
_tcp.sshbox         IN    SRV    0 0    22    sshbox
_ssh._tcp.sshbox    IN    SRV    0 0    22    sshbox
_tcp.ftp            IN    SRV    0 0    23    ftp
_ftp._tcp           IN    SRV    0 0    23    ftp

It looks quite illegible... Is it really how it should be set up? I mean there's a ton of duplicates in fact... Are any of those redundant? There are only 5 services and when I'm providing like 20 or more at home it's going to be hell of configuration...

  • Why are you exposing SRV records to the internet and not keeping them internal? What services require the SRV records? – user2320464 Jun 11 '16 at 18:25
  • They're for people, not for me. I think it's more specialized way of putting this info in DNS than TXT record. I know what I'm hosting on what ports. Others usually forget subdomains / ports. – Lapsio Jun 11 '16 at 21:28
  • I mean they're for people who know how to dig DNS, those who have anything to look for here will know how to. But those services are not private. Those ssh boxes are shared servers accessible publicly. Everything listed in SRV is available publicly. I just have so many services that It'd be nice to be able to just list them knowing root domain. Even I forget sometimes ports of those 50 hosted sites or other web related applications on random ports. I could make another site with just... list of sites but that would be one more domain to remember – Lapsio Jun 11 '16 at 21:36
  • 1
    You'd be better off placing this information on a webpage/wiki as that would be easier for your people to access. SRV records should only be used when there's an explicit purpose such as _ldap/_kerberos. Those you're currently using aren't natively supported by client apps. – user2320464 Jun 11 '16 at 21:58
1

SRV records are meant for services which are designed to check for the existence of service records such as connecting to an XMPP server or a SIP server. DNS should not be used to provide a list of services for end users on your network to browse as DNS is not designed for users to directly read.

The best option is to add the information you need for users to identify the services on your network to an intranet page on your local network or other such publications your users can see them with.

As an example if you where to try to create an SRV record of...

_ftp._tcp.example.com it wouldn't work as the FTP protocol isn't designed to work with SRV records whereas if you where to create one for _sip._tcp.example.com this would work as the SIP protocol is designed to work with SRV records so that when you try to connect to a SIP address at example.com it will automatically look for the _sip._tcp.example.com SRV record to identify the DNS record for the specific SIP server which may be some-sip-machine.example.com.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.