Teamspeak3 server and multiple IP's
Since Guild Wars 2 came I started gamin a little bit again. So when some of the guys asked me to setup a TS3 server, I made it happen in no time. However, not long after people started reporting that they got random disconnects. And then the debugging began... for 3 days straight.
Naturally I use a firewall on my server. In my case it's an iptables based firewall called CSF. I love this, because it integrates in Directadmin and has alot of cool features, like autoblocking bruteforce attacks and port scanners.
However, it seemed that the firewall gave the users a temp ban all the time. I found out that there is some annoying feature in TS3 called TSDNS. This connects to the server on a tcp port (41144) that is not documented in "how to config your firewall". They claim to have removed it in some client versions, but instead I made a compromise and just added that port in the firewall for incoming traffic.
Now they are not getting banned anymore, which is a good thing, but they still get random disconnects and are then not able to connect at all. There is nothing in any logfiles, neither system, firewall or TS3 logs.
So, I knew that everything was setup correct, but it still failed. I then thought "Hey, gotta go old school and look at tcpdumps". Within 10 seconds I found the issue, which I would have though impossible not long ago.
On the server I have two public IP's which has been working out great. By default, all services listen on both IPs/interfaces just to make it easier for me, and it doesn't really matter, as long as they listen on the primary IP.
However, what i did notice in the tcpdump, was that despite I had an open connection with Teamspeak, all of the sudden it would send UDP packages back on the other interface. Ofcourse the clien router/firewall deny these packages, since they are of unknown origin.
I then modified my settings so Teamspeak3 only listen on ONE IP/interface, and now it's working great without disconnects.