Starting a Teamspeak 3 Server on CentOS 6.4

Run the following commands to install a Teamspeak 3 server.

# Secure Iptables
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT

# Teamspeak
iptables -I INPUT -p udp --dport 9987 -j ACCEPT
iptables -I INPUT -p udp --sport 9987 -j ACCEPT

iptables -I INPUT -p tcp --dport 30033 -j ACCEPT
iptables -I INPUT -p tcp --sport 30033 -j ACCEPT

iptables -I INPUT -p tcp --dport 10011 -j ACCEPT
iptables -I INPUT -p tcp --sport 10011 -j ACCEPT

# HTTP(s)
iptables -I INPUT -p tcp --dport 80 -j ACCEPT
iptables -I INPUT -p tcp --sport 80 -j ACCEPT

iptables -I INPUT -p tcp --dport 443 -j ACCEPT
iptables -I INPUT -p tcp --sport 443 -j ACCEPT

# SSH
iptables -I INPUT -p tcp --dport 22 -j ACCEPT
iptables -I INPUT -p tcp --sport 22 -j ACCEPT

# DNS
iptables -I INPUT -p udp --dport 53 -j ACCEPT
iptables -I INPUT -p udp --sport 53 -j ACCEPT

service iptables save && service iptables restart

# Update system
yum -y update

# Add Teamspeak user
useradd teamspeak

# Download, unzip and cleanup Teamspeak
cd /home/teamspeak
wget http://ftp.4players.de/pub/hosted/ts3/releases/3.0.7.1/teamspeak3-server_linux-amd64-3.0.7.1.tar.gz
tar xvfz teamspeak3-server_linux-amd64-3.0.7.1.tar.gz
mv teamspeak3-server_linux-amd64/* `pwd`
rm -rf teamspeak3-server_linux-amd64 && rm -rf teamspeak3-server_linux-amd64-3.0.7.1.tar.gz

# Add chkconfig support to startup file and link to binary
sed -i 's/# All rights reserved/# All rights reserved\n# chkconfig: 2345 99 00/g' ts3server_startscript.sh
ln -s /home/teamspeak/ts3server_startscript.sh /etc/init.d/teamspeak

# Change permissions of Teamspeak
chown -R teamspeak:teamspeak /home/teamspeak
chown -R teamspeak:teamspeak /etc/init.d/teamspeak

# Remount shared memory
mount -t tmpfs tmpfs /dev/shm

# Change to Teamspeak user and run server
su teamspeak
./ts3server_startscript.sh start

echo "Your Teamspeak URL is: `curl ipv4.icanhazip.com`"
  • Game Servers, Linux Guides
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Multicraft (Minecraft Panel) on CentOS 6

Multicraft Panel Multicraft is a simple, easy to use web-based control panel for Minecraft...

Install a Minecraft Server on CentOS 6

This article will guide you through setting up a Minecraft server on a high performance SSD VPS...

Setup a Multi Theft Auto Server on Debian

This is a tutorial explains how to install a Multi Theft Auto server on Debian. It was last...

Setting Up a Garry's Mod Server

The instructions are designed for Ubuntu 14.04 32 bit, but should work on all versions of Ubuntu....

Setting Up Teamspeak 3 on Debian Wheezy

This article will show you how to run a Teamspeak 3 server under Debian Wheezy. Before you can...