воскресенье, 18 марта 2012 г.

TSDNS (TeamSpeak DNS Server) on Debian Squeeze [EN]

Installing TSDNS (TeamSpeak DNS server on Debian Squeeze)

About TSDNS. TSDNS is actually have nothing with DNS, but the idea is very near:
TSDNS allows you to replace port with subdomains.
For example, server1.myts.com will really go to myts.com:2001, and server2.myts.com will go to myts.com:2002, and any other like something-else.myts.com will go to myts.com:2009

When you connect to somehost.example.com, yout TeamSpeak Client tries to connect to it to port 41144, then to it's parent, then it its grandparent and so on. So, for example, if you say TS3 connect to server2.jaguar.melon.sweet.com, it will make theese things:

  • Try to connect to server2.jaguar.melon.sweet.com on port 41144 (Could not connect or even resolve a name)
  • Connect to jaguar.melon.sweet.com on port 41144 (Could not connect or even resolve a name)
  • Connect to melon.sweet.com on port 41144 (Connected)
  • Ask melon.sweet.com about server2.jaguar.melon.sweet.com. 
  • melon.sweet.com says us "I know, it refers to real-server.sweet.com:10002"
  • Connect to real-server.sweet.com:10002
So, in this way, you do not need to tell anyone port number anymore (just because it is unusable)



Installation is quite simple. Create directories
sudo mkdir /etc/ts3dns-server 
sudo mkdir /etc/ts3dns-server/config


Get a TeamSpeak Server distro (for your architecture), extract, place files in the right places
cd ~ 
mkdir ./ts3dns 
cd ./ts3dns 
wget http://teamspeak.gameserver.gamed.de/ts3/releases/3.0.2/teamspeak3-server_linux-amd64-3.0.2.tar.gz 
tar -xvf ./teamspeak3-server_linux-amd64-3.0.2.tar.gz  
cd ./teamspeak3-server_linux-amd64 
cd ./tsdns 
sudo copy ./tsdnsserver_linux_amd64 /usr/bin/tsdns-server 
sudo copy ./tsdns_settings.ini.sample /etc/ts3dns-server/config/ 
sudo copy /etc/ts3dns-server/config/tsdns_settings.ini.sample  /etc/ts3dns-server/config/tsdns_settings.ini
Now download an init.d script (from http://pastebin.com/yFw74cWA )

sudo wget http://pastebin.com/download.php?i=yFw74cWA -O /etc/init.d/tsdns-server
chmod +x  /etc/init.d/tsdns-server

That's all. Now you need to edit your tsdns_settings.ini
sudo nano /etc/tsdns-server/config/tsdns_settings.ini
Config example is



#When connecting to v.example.com, actually, connect to  
#  v.example.com, port 9987 (omitted because it is default port) 
v.example.com =v.example.com 

#When connecting to s1.v.example.com (same as previous rule), actually, connect to  
#  v.example.com, port 9987 (omitted because it is default port) 
s1. v.example.com =v.example.com 
#When connecting to s2.v.example.com, actually, connect to  
#  v.example.com, port 9988 
s2. v.example.com = v.example.com:9988 
#When connecting to {anythingelse}.v.example.com (if tsdns running on v.example.com) 
#When connecting to {anything}[.]{anything}.example.com  (if tsdns is running at exaple.com) 
#actually, connect to v.example.com, port as-set-in-client 
*= v.example.com:$PORT
Start the server (test run)
sudo /etc/init.d/tsdns-server start nodaemon
Check if all ok, stop (CTRL+C), start as normal
sudo /etc/init.d/tsdns-server start  
Add to autostart
sudo update-rc.d tsdns-server defaults



Комментариев нет:

Отправить комментарий