[GH-ISSUE #2007] [Server Request] TSDNS as single Server #1576

Open
opened 2026-02-27 02:57:55 +03:00 by kerem · 0 comments
Owner

Originally created by @xopez on GitHub (Sep 11, 2018).
Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/2007

I would like that TSDNS is implemented as a external server, so it is independent of teamspeak.
The server is included in the teamspeak-server archiv under tsdns. It's just a binary file with tsdns_settings.ini.sample-file as configuration. That file is needed to copy to tsdns_Settings.ini.

I have repacked and uploaded you just the directory where its included.
In 32-Bit directory:
tsdns.zip
Virustotal:
https://www.virustotal.com/de/file/a6865310c76daad0d14d4b5e3e8f5cf864e5e8d94ec723b0a5a147201661d336/analysis/1536681923/
In 64-Bit directory:
tsdns.zip
Virustotal:
https://www.virustotal.com/de/file/2a4a8daf705d81e381e9b1a774d8a963fe7349e79c84d25847d882e6da077b37/analysis/1536682405/

The only difference, I find, is that the binary in the x86-dir is a bit bigger(about 10kb)

Or maybe you want to download yourself the current server.

I also found a german guide, but letting you his scripts here, so you can understand how tsdns works.
Also mentioned here: https://github.com/GameServerManagers/LinuxGSM/issues/1978#issuecomment-416683004
http://krischan.eu/index.php/2013/06/04/howto-tsdns-startscript-autostartscript/

tsdns_startscript.sh:

#!/bin/bash
#
# Copyright (c) TeamSpeak Systems GmbH. All rights reserved.
#
### BEGIN INIT INFO
# Provides: tsdnsserver-linux-x86
# Required-Start: $local_fs $network
# Required-Stop: $local_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: TSDNS Server
# Description: Resolves hostnames to IP and port numbers
### END INIT INFO


if [ -e "tsdnsserver_linux_x86" ]; then
BINARYNAME="tsdnsserver_linux_x86"
else
BINARYNAME="tsdnsserver_linux_x86" #für 64-Bit tsdnsserver_linux_amd64


fi


BINARYPATH="/dir/to/server/tsdns" #richtiges Verzeichnis setzen

cd "${BINARYPATH}"
LIBRARYPATH="$(pwd)"


case "$1" in
start)
if [ -e tsdnsserver.pid ]; then
if ( kill -0 $(cat tsdnsserver.pid) 2> /dev/null ); then
echo "The server is already running, try restart or stop..."
exit 1
else
echo "tsdnsserver.pid found, but no server running. Possibly your previously started server crashed..."
echo "Please view the logfile for details."
rm tsdnsserver.pid
fi
fi
if [ "${UID}" = "0" ]; then
echo "WARNING: For security reasons we advise: DO NOT RUN THE SERVER AS ROOT!!!"
for c in $(seq 1 10); do
echo -n "!"
sleep 1
done
echo "!"
fi
echo "Starting the TSDNS Server."
if [ -e "$BINARYNAME" ]; then
if [ ! -x "$BINARYNAME" ]; then
echo "${BINARYNAME} is not executable, trying to set it..."
chmod u+x "${BINARYNAME}"
fi
if [ -x "$BINARYNAME" ]; then
export LD_LIBRARY_PATH="${LIBRARYPATH}:${LD_LIBRARY_PATH}"
"./${BINARYNAME}" > /dev/null &
echo $! > tsdnsserver.pid
echo "TSDNS Server started, for details please view the log file..."
else
echo "${BINARNAME} is not exectuable, cannot start TSDNS Server..."
fi
else
echo "Could not find ${BINARYNAME}, aborting..."
exit 5
fi
;;
stop)
if [ -e tsdnsserver.pid ]; then
echo -n "Stopping the TSDNS Server."
if ( kill -TERM $(cat tsdnsserver.pid) 2> /dev/null ); then
for c in $(seq 1 300); do
if ( kill -0 $(cat tsdnsserver.pid) 2> /dev/null ); then
echo -n "."
sleep 1
else
break
fi
done
fi
if ( kill -0 $(cat tsdnsserver.pid) 2> /dev/null ); then
echo "Server is not shutting down cleanly - killing..."
kill -KILL $(cat tsdnsserver.pid)
else
echo "done"
fi
rm tsdnsserver.pid
else
echo "No server runing (tsdnsserver.pid is missing)..."
exit 7
fi
;;
update)
if [ -e tsdnsserver.pid ]; then
echo "Updating the TSDNS Server."
export LD_LIBRARY_PATH="${LIBRARYPATH}:${LD_LIBRARY_PATH}"
"./${BINARYNAME}" --update > /dev/null &
echo "TSDNS Server updated, for details please view the log file..."
else
echo "No server runing (tsdnsserver.pid is missing)..."
exit 7
fi
;;
restart)
$0 stop && $0 start || exit 1
;;
status)
if [ -e tsdnsserver.pid ]; then
if ( kill -0 $(cat tsdnsserver.pid) 2> /dev/null ); then
echo "Server is running."
else
echo "Server seems to have died."
fi
else
echo "No server running (tsdnsserver.pid is missing)..."
fi
;;
*)
echo "Usage: ${0} {start|stop|update|restart|status}"
exit 2
esac
exit 0

Autostartscript – tsdns

#!/bin/sh
# chkconfig: 2345 99 01
# description: Teamspeak 3 TSDNS-Server
### BEGIN INIT INFO
# Provides: teamspeak3dns
# Required-Start: $all
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: Teamspeak 3 TSDNS-Server
### END INIT INFO

USER="teamspeak"
DIR="/dir/to/Server" # richtiges Verzeichnis setzen



case "$1" in
start)
su $USER -c "${DIR}/tsdns/tsdns_startscript.sh start"
;;
stop)
su $USER -c "${DIR}/tsdns/tsdns_startscript.sh stop"
;;
restart)
su $USER -c "${DIR}/tsdns/tsdns_startscript.sh restart"
;;
status)
su $USER -c "${DIR}/tsdns/tsdns_startscript.sh status"
;;
*)
echo "Benutze: `basename $0` {start|stop|restart|status}" >&2
exit 1
;;
esac
exit 0

Fully supported on Linux

For updating and installing I found only one possible way.
Check TeamSpeak version. Download the current. extract, maybe only tsdns-folder -> config doesn't get overwritten cause there is only an ini.example which must be renamed to ini on install.
Don't know if it still recieves updates.
Latest entry from changelog with tsdns mentions:
=== Server Release 3.0.13.6 9 november 2016

  • TSDNS server now also listens on ipv6 when available
  • TSDNS server Documentation updated

EDIT:
I should also mention that the config is taken from your current directory and not from the binary directory.

Commandline parameter:

./tsdnsserver --h
Usage: "./tsdnsserver [port]" or "./tsdnsserver --update"
Originally created by @xopez on GitHub (Sep 11, 2018). Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/2007 I would like that TSDNS is implemented as a external server, so it is independent of teamspeak. The server is included in the teamspeak-server archiv under tsdns. It's just a binary file with tsdns_settings.ini.sample-file as configuration. That file is needed to copy to tsdns_Settings.ini. I have repacked and uploaded you just the directory where its included. In 32-Bit directory: [tsdns.zip](https://github.com/GameServerManagers/LinuxGSM/files/2371755/tsdns.zip) Virustotal: https://www.virustotal.com/de/file/a6865310c76daad0d14d4b5e3e8f5cf864e5e8d94ec723b0a5a147201661d336/analysis/1536681923/ In 64-Bit directory: [tsdns.zip](https://github.com/GameServerManagers/LinuxGSM/files/2371787/tsdns.zip) Virustotal: https://www.virustotal.com/de/file/2a4a8daf705d81e381e9b1a774d8a963fe7349e79c84d25847d882e6da077b37/analysis/1536682405/ The only difference, I find, is that the binary in the x86-dir is a bit bigger(about 10kb) Or maybe you want to download yourself the current server. I also found a german guide, but letting you his scripts here, so you can understand how tsdns works. Also mentioned here: https://github.com/GameServerManagers/LinuxGSM/issues/1978#issuecomment-416683004 http://krischan.eu/index.php/2013/06/04/howto-tsdns-startscript-autostartscript/ tsdns_startscript.sh: ``` #!/bin/bash # # Copyright (c) TeamSpeak Systems GmbH. All rights reserved. # ### BEGIN INIT INFO # Provides: tsdnsserver-linux-x86 # Required-Start: $local_fs $network # Required-Stop: $local_fs $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: TSDNS Server # Description: Resolves hostnames to IP and port numbers ### END INIT INFO if [ -e "tsdnsserver_linux_x86" ]; then BINARYNAME="tsdnsserver_linux_x86" else BINARYNAME="tsdnsserver_linux_x86" #für 64-Bit tsdnsserver_linux_amd64 fi BINARYPATH="/dir/to/server/tsdns" #richtiges Verzeichnis setzen cd "${BINARYPATH}" LIBRARYPATH="$(pwd)" case "$1" in start) if [ -e tsdnsserver.pid ]; then if ( kill -0 $(cat tsdnsserver.pid) 2> /dev/null ); then echo "The server is already running, try restart or stop..." exit 1 else echo "tsdnsserver.pid found, but no server running. Possibly your previously started server crashed..." echo "Please view the logfile for details." rm tsdnsserver.pid fi fi if [ "${UID}" = "0" ]; then echo "WARNING: For security reasons we advise: DO NOT RUN THE SERVER AS ROOT!!!" for c in $(seq 1 10); do echo -n "!" sleep 1 done echo "!" fi echo "Starting the TSDNS Server." if [ -e "$BINARYNAME" ]; then if [ ! -x "$BINARYNAME" ]; then echo "${BINARYNAME} is not executable, trying to set it..." chmod u+x "${BINARYNAME}" fi if [ -x "$BINARYNAME" ]; then export LD_LIBRARY_PATH="${LIBRARYPATH}:${LD_LIBRARY_PATH}" "./${BINARYNAME}" > /dev/null & echo $! > tsdnsserver.pid echo "TSDNS Server started, for details please view the log file..." else echo "${BINARNAME} is not exectuable, cannot start TSDNS Server..." fi else echo "Could not find ${BINARYNAME}, aborting..." exit 5 fi ;; stop) if [ -e tsdnsserver.pid ]; then echo -n "Stopping the TSDNS Server." if ( kill -TERM $(cat tsdnsserver.pid) 2> /dev/null ); then for c in $(seq 1 300); do if ( kill -0 $(cat tsdnsserver.pid) 2> /dev/null ); then echo -n "." sleep 1 else break fi done fi if ( kill -0 $(cat tsdnsserver.pid) 2> /dev/null ); then echo "Server is not shutting down cleanly - killing..." kill -KILL $(cat tsdnsserver.pid) else echo "done" fi rm tsdnsserver.pid else echo "No server runing (tsdnsserver.pid is missing)..." exit 7 fi ;; update) if [ -e tsdnsserver.pid ]; then echo "Updating the TSDNS Server." export LD_LIBRARY_PATH="${LIBRARYPATH}:${LD_LIBRARY_PATH}" "./${BINARYNAME}" --update > /dev/null & echo "TSDNS Server updated, for details please view the log file..." else echo "No server runing (tsdnsserver.pid is missing)..." exit 7 fi ;; restart) $0 stop && $0 start || exit 1 ;; status) if [ -e tsdnsserver.pid ]; then if ( kill -0 $(cat tsdnsserver.pid) 2> /dev/null ); then echo "Server is running." else echo "Server seems to have died." fi else echo "No server running (tsdnsserver.pid is missing)..." fi ;; *) echo "Usage: ${0} {start|stop|update|restart|status}" exit 2 esac exit 0 ``` Autostartscript – tsdns ``` #!/bin/sh # chkconfig: 2345 99 01 # description: Teamspeak 3 TSDNS-Server ### BEGIN INIT INFO # Provides: teamspeak3dns # Required-Start: $all # Required-Stop: # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Description: Teamspeak 3 TSDNS-Server ### END INIT INFO USER="teamspeak" DIR="/dir/to/Server" # richtiges Verzeichnis setzen case "$1" in start) su $USER -c "${DIR}/tsdns/tsdns_startscript.sh start" ;; stop) su $USER -c "${DIR}/tsdns/tsdns_startscript.sh stop" ;; restart) su $USER -c "${DIR}/tsdns/tsdns_startscript.sh restart" ;; status) su $USER -c "${DIR}/tsdns/tsdns_startscript.sh status" ;; *) echo "Benutze: `basename $0` {start|stop|restart|status}" >&2 exit 1 ;; esac exit 0 ``` Fully supported on Linux For updating and installing I found only one possible way. Check TeamSpeak version. Download the current. extract, maybe only tsdns-folder -> config doesn't get overwritten cause there is only an ini.example which must be renamed to ini on install. Don't know if it still recieves updates. Latest entry from changelog with tsdns mentions: === Server Release 3.0.13.6 9 november 2016 - TSDNS server now also listens on ipv6 when available * TSDNS server Documentation updated EDIT: I should also mention that the config is taken from your current directory and not from the binary directory. Commandline parameter: ``` ./tsdnsserver --h Usage: "./tsdnsserver [port]" or "./tsdnsserver --update" ```
Sign in to join this conversation.
No labels
Atomic
Epic
cannot reproduce
command: backup
command: console
command: debug
command: details
command: fast-dl
command: install
command: mods
command: monitor
command: post-details
command: restart
command: send
command: start
command: stop
command: update
command: update-lgsm
command: validate
command: wipe
distro: AlmaLinux
distro: Arch Linux
distro: CentOS
distro: Debian
distro: Fedora
distro: RedHat
distro: Rocky Linux
distro: Ubuntu
distro: openSUSE
engine: goldsrc
engine: source
game: 7 Days to Die
game: ARMA 3
game: Ark: Survival Evolved
game: Assetto Corsa
game: Avorion
game: BATTALION: Legacy
game: Barotrauma
game: Battalion 1944
game: Battlefield 1942
game: Black Mesa: Deathmatch
game: Blade Symphony
game: Call of Duty 2
game: Call of Duty 4
game: Call of Duty: United Offensive
game: Counter-Strike 1.6
game: Counter-Strike 2
game: Counter-Strike: Global Offensive
game: Counter-Strike: Source
game: Day of Infamy
game: Dayz
game: Death Match Classic
game: Don't Starve Together
game: ET: Legacy
game: Eco
game: Factorio
game: Factorio
game: Garry's Mod
game: Half-Life
game: Hurtword
game: Insurgecy
game: Insurgecy
game: Insurgency: Sandstorm
game: Just Cause 3
game: Killing Floor
game: Killing Floor 2
game: Left 4 Dead 2
game: Minecraft
game: Minecraft Bedrock
game: Mordhau
game: Multi Theft Auto
game: Mumble
game: Natural Selection 2
game: No More Room in Hell
game: Pavlov VR
game: Post Scriptum
game: Project Zomboid
game: Quake 3
game: QuakeWorld
game: Red Orchestra: Ostfront 41-45
game: Return to Castle Wolfenstein
game: Rising World
game: Rust
game: San Andreas Multiplayer
game: Satisfactory
game: Soldat
game: Soldier of Fortune 2
game: Squad
game: Squad 44
game: Starbound
game: Stationeers
game: Sven Co-op
game: Team Fortress 2
game: Teamspeak 3
game: Teeworlds
game: Terraria
game: The Front
game: Unreal Tournament 2004
game: Unreal Tournament 3
game: Unreal Tournament 99
game: Unturned
game: Valheim
game: Wurm Unlimited
game: Zombie Master Reborn
game: label missing
good first issue
help wanted
info: alerts
info: dependency
info: docker
info: docs
info: email
info: query
info: steamcmd
info: systemd
info: tmux
info: website
info: website
needs more info
outcome: duplicate
outcome: issue resolved
outcome: issue resolved
outcome: issue unresolved
outcome: pr accepted
outcome: pr rejected
outcome: unconfirmed
outcome: wontfix
outcome: wrong forum
potential-duplicate
priority
pull-request
type: bug
type: feature
type: feature
type: feature request
type: game server request
type: refactor
waiting response
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/LinuxGSM#1576
No description provided.