I have a TeamSpeak server that is hosted on a GameServers account under the domain ts4.gameservers.com with a port number of 9102. I have setup a CName that redirects ts.valhallashalls.com to ts4.gameservers.com, but to connect I still have to use the port number within the server.
As the gameserver host is using a non-standard port number for TeamSpeak is it possible to redirect with an SRV record from ts.valhallashalls.com without a port number to connect to my teamspeak server with the port number 9102?
Per default, the TS3 server creates a virtual voice server on port 9987 (UDP). The ServerQuery is listening on port 10011 (TCP) and file transfers will use port 30033 (TCP).
So what I want to do is redirect ts.valhallashalls.com, without a Port Number so when trying to connect a team speak client it will automatically try to connect to port 9987, and have it transparently be redirected to the correct port number.
Can I do this with a SRV Record?
In version 3.0.8 and greater of the TeamSpeak Client on Mac, Linux and Windows, you can now use SRV records to connect to your servers. The format is as follows. Currently, there is no support for SRV records on iOS and Android versions of TeamSpeak.
Format for a SRV record for a TS3 server is:
_ts3._udp.name TTL IN SRV priority weight port target
It is also possible to add a SRV record for a TSDNS server for a domain, the format for this is:
_tsdns._tcp.name TTL IN SRV priority weight port target
The priority when resolving is:
- _ts3 SRV record
- _tsdns SRV record
Using my server detail as the example above, I can do the following to setup an SRV Record on my valhallashalls.com domain, using ts as it’s subdomain to connect to the TeamSpeak server hosted by GameServers.
_ts3._udp.ts 3600 IN SRV 0 100 9102 ts4.gameservers.com
We no longer use GameServers as our primary account, as we have a VPS hosted by MediaTemple. For that I setup a selection of servers, one on the VPS, I kept the Game Servers account as a backup, and the last is on my home connection. They are donamed within my domain by their CNAME of ts1, ts2, and ts3 respectively. This allows for a redundant setup.
ts1.valhallashalls.com. CNAME @.
ts2.valhallashalls.com. CNAME ts4.gameservers.com.
ts3.valhallashalls.com. CNAME .
The SRV Records look like this
ts3_.udp.ts 3600 IN SRV 0 100 9987 ts1.valhallashalls.com
ts3_.udp.ts 3600 IN SRV 1 100 9102 ts2.valhallashalls.com
ts3_.udp.ts 3600 IN SRV 2 100 9987 ts3.valhallashalls.com
SRV records don’t “do” anything on their own. Clients have to be developed to use those SRV records in order to figure out how to find or connect to a given service.
Googling around, it appears that teamspeak decided to make up their own “TSDNS” protocol that appears to be a special server you have to run on a specific port so that TS can ask it what port to connect to “for real”. It appears that as of May, having the client find the server through a SRV record is still planned.
If you are using Apache for the webserver you can do a mod rewrite rule to forward requests on ts.v…com to the ts4.game….com server and include port numbers. Is the service http based or is it a program directly cOnnecting?