Koozali.org: home of the SME Server
Obsolete Releases => SME 7.x Contribs => Topic started by: cool34000 on August 26, 2006, 11:16:31 PM
-
I searched a howto for TeamSpeak with SME server and didn't find a complete howto...
So, i'm just putting together a lot of stuff founded in several posts
Here's one who worked for me...
I've tested it on a SME 6.0.1-01 and on a SME 7.0 final install and it works very well... As i'm quite new and noob with SME, i didn't tested it on other versions...
First of all, download ts2_server_rc2_20201.tar.bz2 (latest stable)here (http://www.goteamspeak.com/index.php?page=downloads)
then, make a file called teamspeak with that : (cut+paste)
#! /bin/bash
# Copyright (c) 2004 TeamSpeak team All rights reserved.
#
# Author: pwk.linuxfan 2004
# Modified by Derek "Cybernaut" Jackson - www.DigitalNines.com
#
# chkconfig: 345 85 15
# description: Runs and kills TeamSpeak Voice server at boot time and shutdown.
# Source function library.
#. /etc/rc.d/init.d/functions
# START OF CONFIG SECTION
# WARNING ! For security reasons we advise: DO NOT RUN THE SERVER AS ROOT
USER=teamspeak
DIR=/home/teamspeak/tss2_rc2
# END OF CONFIG SECTION
# See how we were called.
case "$1" in
start)
if [ -e $DIR/tsserver2.pid ]; then
echo "tsserver2.pid already exists...server already started ?";
echo "If you are sure the server is not running, delete tsserver2.pid"
exit 1
else
if [ "$UID" = "0" ]; then
for c in $(seq 1 10); do
echo -n "!"
sleep 1
done
echo !
fi
echo "Starting the TeamSpeak Voice server..."
if [ -e $DIR/server_linux ]; then
if [ ! -x $DIR/server_linux ]; then
echo "server_linux is not executable; trying to set it."
chmod u+x $DIR/server_linux
fi
if [ -x $DIR/server_linux ]; then
WD=pwd
cd $DIR
su $USER -c "$DIR/server_linux -PID=tsserver2.pid" &
cd $WD
else
echo "server_linux is not executable; fix this."
exit 4
fi
else
echo "Couldnt find server_linux."
exit 5
fi
fi
;;
stop)
if [ -e $DIR/tsserver2.pid ]; then
echo -n "Stopping the TeamSpeak Voice server..."
if ( kill -TERM cat $DIR/tsserver2.pid ); then
for c in $(seq 1 300); do
if [ -e $DIR/tsserver2.pid ]; then
echo -n "."
sleep 1
fi
done
fi
if [ -e $DIR/tsserver2.pid ]; then
echo "server does not shutdown cleanly - killing"
kill -KILL cat $DIR/tsserver2.pid
rm $DIR/tsserver2.pid
sleep 5
else
echo "done"
fi
else
echo "tsserver2.pid is missing; is the server stopped already?"
#exit 7 - Should not be here as doesn't allow restart if server is already stopped.
fi
;;
restart)
$0 stop && $0 start || exit 1
;;
status)
if [ -e $DIR/tsserver2.pid ]; then
echo "The TeamSpeak Voice server is running."
exit 0
else
echo "The TeamSpeak Voice server is stopped."
exit 3
fi
;;
passwords)
if [ -e $DIR/server.log ]; then
date=$(cat $DIR/server.log | grep "admin account info: username: admin" | tail -n 1 | sed "s/^\([0-9]\+-[0-9]\+-[0-9]\+ [0-9]\+:[0-9]\+:[0-9]\+\).*$/\1/")
spass=$(cat $DIR/server.log | grep "superadmin account info: username: superadmin" | tail -n 1 | sed"s/^.*username: superadmin password: \([a-z0-9]\+\).*$/\1/")
pass=$(cat $DIR/server.log | grep "admin account info: username: admin" | tail -n 1 | sed "s/^.*username: admin password: \([a-z0-9]\+\).*$/\1/")
echo "Following passwords were generated on $date"
echo "superadmin = \"$spass\""
echo "admin = \"$pass\""
else
echo "server.log not found; maybe the server has not been started yet?"
exit 1
fi
;;
*)
echo "Usage: $0 {start|stop|restart|status|passwords}"
exit 2
esac
exit 0
Don't modify this file untill you know what you're doing... That's how TS starts and stop !!!
I saved all the files (this one + the downloaded package) in /root/addons/tss2 so you have to modify the following to feet your needs !
echo "Installation de TeamSpeak Server 2 RC2"
useradd -d /home/teamspeak teamspeak -p your_teamspeak_password_here
cp /root/addons/tss2/ts2_server_rc2_20201.tar.bz2 /home/teamspeak/ts2_server_rc2_20201.tar.bz2
cd /home/teamspeak
tar -xjf ts2_server_rc2_20201.tar.bz2
rm ts2_server_rc2_20201.tar.bz2
cp /root/addons/tss2/teamspeak /etc/init.d/teamspeak
chmod 755 /etc/init.d/teamspeak
ln -s /etc/rc.d/init.d/teamspeak /etc/rc.d/rc7.d/S98teamspeak
ln -s /etc/rc.d/init.d/teamspeak /etc/rc.d/rc6.d/K03teamspeak
cd /home/teamspeak/tss2_rc2
./teamspeak2-server_startscript start
sleep 2
./teamspeak2-server_startscript stop
cd /home/teamspeak
chown teamspeak:teamspeak * -R
service teamspeak start
# echo "/sbin/iptables --append INPUT -p udp --dport 8767 -i \$OUTERIF -j ACCEPT" > /etc/e-smith/templates/etc/rc.d/init.d/masq/42AllowTS
# /sbin/e-smith/expand-template /etc/rc.d/init.d/masq
A user called teamspeak is created (change his password in the script !)
Don't mind of the root warning during installation, it's a way to fix a problem during installation, the start script is first started with root rights, then it shutdowns, change owner and then start the service with the good user !
If you server is in gateway+server mode, then you have to uncomment the last 2 lines (not tested on both versions of SME, but seen on another forum) to open open port 8767UDP... If as me you're in server-only mode, just redirect port 8767UDP from the firewall/nat to your server's IP
After installation, just open /home/teamspeak/tss2_rc2/server.log with your favorite text editor and grab the admin and superadmin passwords (radomly generated at the install stage)
Then, go to http://yourserver:14534 to configure the few settings in the web interface... And connect to it with the client, all should be working !
TeamSpeak client is available for all platforms...
-
After installation, just open /home/teamspeak/tss2_rc2/server.log with your favorite text editor and grab the admin and superadmin passwords (radomly generated at the install stage)
You could probably do the following to get the passwords...
cd /home/teamspeak/tss2_rc2
./teamspeak2-server_startscript passwords
-
Thanks for the tip !
-
Thanks for the tip !
I've had an attempt at creating a How-To which is more within the SMEServer guidelines.
http://no.longer.valid/phpwiki/index.php/How-To%20install%20TeamSpeak%20on%20SME%207.0%20%28and%20start%20it%20on%20boot%20up%29
-
Thanks for making a more 'sme-like' howto.
I've tested it, and it's working fine !!!
Has someone tested it in server-gateway mode ?
-
I've tested on a server-gateway and it works fine too.
-
You will also need to open the port in server-only mode to accept external connexions to TS Server.
Just follow willam_syd's howto and type those more lines :
echo "/sbin/iptables --append INPUT -p udp --dport 8767 -i \$INTERNALIF -j ACCEPT" > /etc/e-smith/templates/etc/rc.d/init.d/masq/42AllowTS
expand-template /etc/rc.d/init.d/masq
This should open the TS server to Internet :-D
I got that after doing iptables -L :
ACCEPT udp -- anywhere anywhere udp dpt:8767
-
OK, I've managed to create a better template witch should open port 8767 in iptables according to the server mode (serveronly or server+gateway)
So now, 42AllowTS should look like this :
if [ -n "$OUTERIF" ]; then
/sbin/iptables --append INPUT -p udp --dport 8767 -i $OUTERIF -j ACCEPT
else
/sbin/iptables --append INPUT -p udp --dport 8767 -i $INTERNALIF -j ACCEPT
fi
Don't forget to expand template :
expand-template /etc/rc.d/init.d/masq
and to restart masq :
service masq restart
I think the howto should be updated william_syd.
Thanks
-
I think the howto should be updated william_syd.
Thanks
I agree. Just select 'Edit' at the bottom of the how-to page. :-D
Here is a link to 42AllowTS (http://magicwilly.webhostingpal.com/SME7%20How%20To%20Files/TeamSpeak/42AllowTS).
-
Done !
It's up to date now. Thanks for linking the file William...
Didn't know I could edit a howto... :-D How noob am I ??? :hammer:
-
You can edit most pages here that are part of the wiki. Some are locked and you need to be a "very very special person" to change them :-)
Back when I was an ultra noob.. http://forums.contribs.org/index.php?topic=30320.msg127167#msg127167
-
I guess this is what man call 'community'... This is really new for me since I am totally new to linux world.
But I gotta say I really love this way of working...
-
edit: as soon as you ask for help - you find a solution ;)
-
This is fantastic thanks to those who put this together!
-
Hi yall,
firstly, thanks for the efforts on the TS contrib.
Now for the layout. I have an SME7.1 >test box(TB)< hanging out
behind my SME7.1 >production machine(PM)< which is an
server-gateway/webserver/mail etc..
I have followed the How-To above to install TS on my test box(TB),
and then setup my SME7.1 (PM) to forward UDP-port 8767 to the
SME7.1 (TB). I have also install the 42AllowTS to the SME7 (TB).
Q1). can the above setup work?
Q2). any thoughts on why I can't get a TS connection from the WAN side?
My logs didn't show any obvious errors(to my eyes!). IOW, I didn't see
any connection fails etc..
This setup is not critical.. testbox! I am doing it to learn a little more and
try to have a little fun.
Any thoughts much appreciated
Joe
-
Can you connect on the lan side ?
-
Hi William,
Can you connect on the lan side ?
Yes I can.
Since my previous post I have gotten TS to work.
And I *may* have found a bug in the Port Forwarding Panel.
As it turned out the Port Forward rule was not being applied from the Server Manager.
When I went into the console and ran the commands:
expand-template /etc/rc.d/init.d/masq
service masq restart
It started working as expected. I will be visiting the Bug Tracker later on tonight.
Thanks
Joe
-
@boss_hog,
Did you put this in the bugtracker? (I cannot find it)
followed the how-to on a clean 7.1.2 server (server-only) and cannot reach the server from the wan side.
When i do a service masq stop, then it is reachable so the problem has to do something with port-opening.
Is this the same problem you had. Can you please name the bug ID (or tell me what I am doing wrong)
Lourens
-
Hi Lourens,
Did you put this in the bugtracker? (I cannot find it)
No, sorry, I did not.
After making that post and looking through my logs, it was obvious that my SME7 production machine(PM) was forwarding the port.
What I could not figure out, was why the SME7 testbox(TB) was ignoring the forward. The Teamspeak server did start working, however.
After upgrading my SME7(TB) to 7.1.2, the Teamspeak server is not respongding, again.
I may have a little time next week to look at this gem again.
Joe
P.S. for the record, at the moment my TS server is accessible from the LAN, but is not reachable from the WAN.
-
Boss_hog,
I have the same problems on 2 (server-only) servers that I upgraded from 7.1 to 7.12. Not accesible from WAN. I have not enough knowledge to define what may have caused this, so I hope you can make a bug report.
Lourens
-
Hi there !
It looks like TS is working in server+gateway mode but it's not working anymore on a server-only SME. On a serveronly SME, I can also connect from LAN but not from the outside...
Could this be caused by the template 42AllowTS ?
I'm wondering if this template is really needed... Should the port (8767 UDP) be opened with the conventionnal command config set teamspeak service status enabled UDPPort 8767 access public
Can someone confirm the command is good/will work ?
-
I would get rid of the template, set the db with your command and do a signal-event remoteaccess-update
I'm not using TS at the moment.
-
Hi there !
It looks like TS is working in server+gateway mode but it's not working anymore on a server-only SME. On a serveronly SME, I can also connect from LAN but not from the outside...
Could this be caused by the template 42AllowTS ?
I'm wondering if this template is really needed... Should the port (8767 UDP) be opened with the conventionnal command config set teamspeak service status enabled UDPPort 8767 access public
Can someone confirm the command is good/will work ?
In my case, i used teamspeak in server only mode too. And it work with SME 7.1.1. btu when i upgrade to sme 7.1.2, it doesn't work. I can access to teamspeak with LAN but not with WAN. I have a tools in other internet site that indicate to me that teamspeak is runing with test on 8767 port. But nobody can connecte to my server even if i think tha 8767 port is open.
http://www.tsviewer.com/index.php?page=ts_viewer&ID=19155
Is there a link where i can test that 8767 port is open in both direction?
is there on SME 7.1.2 something to indicate that this port is for a service (teamspeak)? Is there with iptables a restriction to all UDP port?
Thank for respond.
Sorry for my poor english (i am french)
-
As i use the SME serveur behind a routeur that make firewall. I desactivat the masq service and teamspeak can be access by WAN area.
It is strange to have a firewall on a server that is in green area.
Nicocha
-
Q: Which ports does the server use?
A:
Voice TeamSpeak 2 client: 8767 UDP
Webinterface Browser: http://server_ip:webinterface_port 14534 TCP
HTTPServer Port=12345
TCP query telnet server_ip tcpquery_port 51234 TCP
To get your server working behind a router/firewall you only need to forward/open port 8767 UDP (not TCP).
Q: Some people can't connect to my server, some can. How to fix?
A:
Symptoms:
* People who are using a home router (NAT) CAN'T connect to your server, but they CAN connect to other servers.
* People connected directly to the internet, CAN connect to your server.
* The machine that is running the server has more than one external ip number.
The server is probably sending replies using a different ip address than the one the clients connect to. (Most likely they connected to an alias, not the primary ip). Nat routers don't know what to do with this foreign incoming data (unknown ip+port), and drop the packets.
Solution:
* Open the file server.ini that is created in the same directory where the server executable is located.
* Look for the following line in section [Main Config]:
BoundToIp1=
* Modify it like this:
BoundToIp1=213.202.254.117
This will make the server listen and send only on the specified address. Even easier is to let the clients connect to the primary IP of the machine.
Note: You can bind the server to multiple IP addresses by adding additional BoundToIp options (i.e. BoundToIp2, BoundToIp3, etc.) to your server.ini.
-
Q: Which ports does the server use?
A:
Voice TeamSpeak 2 client: 8767 UDP
Webinterface Browser: http://server_ip:webinterface_port 14534 TCP
HTTPServer Port=12345
TCP query telnet server_ip tcpquery_port 51234 TCP
To get your server working behind a router/firewall you only need to forward/open port 8767 UDP (not TCP).
Q: Some people can't connect to my server, some can. How to fix?
A:
Symptoms:
* People who are using a home router (NAT) CAN'T connect to your server, but they CAN connect to other servers.
* People connected directly to the internet, CAN connect to your server.
* The machine that is running the server has more than one external ip number.
The server is probably sending replies using a different ip address than the one the clients connect to. (Most likely they connected to an alias, not the primary ip). Nat routers don't know what to do with this foreign incoming data (unknown ip+port), and drop the packets.
Solution:
* Open the file server.ini that is created in the same directory where the server executable is located.
* Look for the following line in section [Main Config]:
BoundToIp1=
* Modify it like this:
BoundToIp1=213.202.254.117
This will make the server listen and send only on the specified address. Even easier is to let the clients connect to the primary IP of the machine.
Note: You can bind the server to multiple IP addresses by adding additional BoundToIp options (i.e. BoundToIp2, BoundToIp3, etc.) to your server.ini.
@boss_hog and Nicocha; Was this the solution for your problem. I can still not connect on the WAN site. Do you have the same problems or am I doing something wrong? I didn't make any changes in teamspeak or my router, problem occured when I did the upgrade from 7.1 tot 7.12
Lourens
-
@boss_hog and Nicocha; Was this the solution for your problem. I can still not connect on the WAN site. Do you have the same problems or am I doing something wrong? I didn't make any changes in teamspeak or my router, problem occured when I did the upgrade from 7.1 tot 7.12
Lourens
Has i say, i have stop the masq service. Has you are in serveur mode, behind a routeur (that make firwall) i think you can stop masq (the sme firwall with iptable). (i didn't try william_syd solution because it's work befor upgrade from 7.1 to 7.1.2)
For that i use a contrib "service" but also you can test with the commande
service masq stop
and if it's work delete the SXXmasq link int /etc/rc.d/rc7.d with XX a number.
Nicocha
-
Hey !
I'd rather wait for an explanation (there must be one !). It was working before v7.1.2, something must have changed in SME configuration !
I don't think it's a good idea to desactivate the firewall (even if you're in server-only mode).
-
I don't think it's a good idea to desactivate the firewall (even if you're in server-only mode).
Server only mode doesn't have a firewall.
-
@boss_hog and Nicocha; Was this the solution for your problem. I can still not connect on the WAN site. Do you have the same problems or am I doing something wrong? I didn't make any changes in teamspeak or my router, problem occured when I did the upgrade from 7.1 tot 7.12
Lourens
Has i say, i have stop the masq service. Has you are in serveur mode, behind a routeur (that make firwall) i think you can stop masq (the sme firwall with iptable). (i didn't try william_syd solution because it's work befor upgrade from 7.1 to 7.1.2)
For that i use a contrib "service" but also you can test with the commande
service masq stop
and if it's work delete the SXXmasq link int /etc/rc.d/rc7.d with XX a number.
Nicocha
Thats not really the best way.
config setprop masq status disabled
/etc/rc.d/rc7.d/S36masq stop
-
Hey !
I'd rather wait for an explanation (there must be one !). It was working before v7.1.2, something must have changed in SME configuration !
I don't think it's a good idea to desactivate the firewall (even if you're in server-only mode).
What does
iptables -L |grep 8767
give you?
-
Hi William,
What does
iptables -L |grep 8767
give you?
[root@sme7test ~]# iptables -L |grep 8767
ACCEPT udp -- anywhere anywhere udp dpt:8767
ACCEPT udp -- anywhere sme7test.<mydomain>.com udp dpt:8767
The above was run with the firewall running.
In my testing, since my testbox(TB) was updated, the only way I can
connect to the TS2 server from the WAN is to disable the firewall: S36masq stop
This is not my preferred method, but the TS2 server is behind
another SME Server(my production machine).
Joe
-
Hi !
Mine is only giving me that :#iptables -L |grep 8767
ACCEPT udp -- anywhere myserver.mydomain.com udp dpt:8767
The problem should come from elsewhere...
I also tryed to change the 'BoundToIp1' to my external ip address and when I restart the service I get this error :Error, Either an old instance of teamspeak is still running, or an other application is using the tcpquery port!
Removing it solve the problem of course and I can start my service again.
-
Howdy yall,
a bug was reported(not confirmed) that may be part
of the TS2 problem.
Check out Bug #2812 in the bug tracker, http://bugs.contribs.org/show_bug.cgi?id=2812
Joe
-
Hi
Great find !!!
That could be a part of TS problem. I will do some tests with the fix proposed from the bugtracker on a test server... And tell the results here of course !
-
Hi all !
I've tested the fix proposed from the bugtracker and TeamSpeak is working now... 8) :D 8)
I've created a custom template to fix the problem, anyone doing so should remember to delete the custom template when masq's rpm will be updated !
-
In script called "teamspeak" (first page, first post)
if [ -x $DIR/server_linux ]; then
WD=pwd
cd $DIR
su $USER -c "$DIR/server_linux -PID=tsserver2.pid" &
cd $WD
else
it misses the signs around the pwd command :
WD=`pwd`
-
Hello,
Download the file William is generously hosting (http://magicwilly.webhostingpal.com/SME7%20How%20To%20Files/TeamSpeak/teamspeak)
This file works :)
-
Hi all,
I've made a try on building an rpm of TeamSpeak Server for SME 7.x
You can download rpms and/or srpms here (http://mirror.contribs.org/smeserver/contribs/sgomez/contribs/teamspeak/)
Any comments/suggestions will be welcome.
Have fun!
Best regards,
Sylvain