2

I have read up on SRV records, and thinking I understand what they are meant for, I want to achieve the following:

In short: Bind a hostname to another hostname, but changing the port.

I.e. Take into account, I have a hostname of aaa.bbb.com.

On aaa.bbb.com, I have an RDP service port forwarded on port 5000.

So, using RDP, I need to connect to aaa.bbb.com:5000.

I wish to create newhostname.bbb.com IN SRV 1 0 5000 aaa.bbb.com, so that I may connect to newhostname.bbb.com, without specifying the 5000 port.

I wish to create custom mappings like this for all my services on multiple domains.

I have created SRV records with Dyn.com, but they don;t seem to be working. From what I understand, the protocol itself must "support/look for" SRV records? Is that correct?

Questions:

  • Can the above be achieved?
  • Am I missing the point of SRV?
  • If it can be achieved, is it only available to certain protocols?
Sven
  • 98,649
  • 14
  • 180
  • 226
Louis van Tonder
  • 141
  • 2
  • 13

1 Answers1

5

Protocols (well the applications that implement them) have to be designed to take advantage of SRV records.

Take Outlook for example. When it tries to automatically look up your Exchange server, it will look for an SRV record based on the domain part of the email address (_autodiscover._tcp.{domain}). If found, it will connect to the server and port specified in the SRV record (so SRV records can be used to allow SRV aware applications to run on non-standard ports, transparent to the user).

Most protocols (such as RDP, HTTP, various email protocols, etc) have not been designed to take advantage of SRV records (and it doesn't look like most of them ever will either).

When you RDP to newhostname.bbb.com, the RDP client is just trying to get the A record for newhostname.bbb.com, and connecting to that on the default port, unless you manually specify a different port.

What you would need is the RDP client to look for an SRV record for the hostname that you enter (which would most likely be something like _rdp._tcp.example.com, as all SRV records follow a _service._protocol.aaa.bbb format), and then connect to the host/port specified in that SRV record. This obviously would require changes to the RDP client application.

USD Matt
  • 5,381
  • 15
  • 23
  • Thanks. Makes perfect sense, also thanks to David for his help. – Louis van Tonder May 02 '13 at 11:27
  • 2
    Actually, most protocols do use SRV records (for email, SMTP use MX - a ligher form of SRV - but IMAP and POP have RFC 6186). HTTP is the biggest exception (but a very big one). – bortzmeyer May 02 '13 at 16:52
  • 2
    I wouldn't say 'most' protocols - there are hundreds at least. I was unaware that there were proposals to use SRV for IMAP/POP3/SMTP although is this supported by the major email clients? I grant you that SRV and MX are a *bit* similar but the glaring ommision is no port specification in MX so your server has to be on port 25. – USD Matt May 02 '13 at 17:58