Hi there!
I have just finished my work on a small script, which I called
TeamSpeak 2 Anti-Flood Daemon. I know many of you have searched a workaround for the well known flooding attempts on TeamSpeak 2 servers. This script might help you. There are a few alternatives to this script, but some of them don't work on Windows, or the installation is way too complicated.
Download:
Click
here to Download the latest version of the script or open the following URL with your browser:
http://www.planetteamspeak.com/compo...etails/gid,42/
Features:
- Prevents flooding attempts on TeamSpeak 2 servers by banning the performing IP address for 5 minutes.
- Protects all virtual servers in a running TeamSpeak 2 server instance
- Logs flooding attemps with exact date and IP address
- Sends a private message to every serveradmin connected to the respective virtual server
Requirements:
- A distribution of Perl
- One of the latest BETA versions of the TeamSpeak 2 server (i.e. 2.0.22.3)
How to install the script:- The script uses the TeamSpeak 2 servers logfile (server.log) to prevent flooding attempts by banning the performing IP address. This means you'll have to enable the enhanced logging capabilities of your TeamSpeak 2 server.
Look for the following lines in your server.ini file and enable at least access_r and access_u for the script to function normally:
Code:
[log]
access_r=0
access_u=0
channel_registerred=0
channel_unregisterred=0
sa=0
chat=0
kick_server=0
kick_channel=0
- Create a new folder and copy all files from the Zip-archive into it. The folder should now contain the following files and folders:
Code:
drwxr-xr-x 2 TeamSpeak2
-rwxr-xr-x 1 ts2afd.pl
-rwxr-xr-x 1 ts2afd_startscript
- Open the file ts2afd.pl with your favorite text-editor and follow the instructions in the configuration area. An example is shown below:
Code:
# ============================================================================================
# ======================================= CONFIGURATION ======================================
# ============================================================================================
# ****** SERVER ADDRESS AND TCP QUERY PORT ******
# This is the hostname or IP address and TCP port of the TeamSpeak 2 server.
# If you are unsure of what to put here, leave the default values.
my $server_address = "localhost";
my $server_tcpport = "51234";
# ****** SUPERADMIN USERNAME & PASSWORD ******
# This is the username and password you use to access your TeamSpeak 2 server.
# This must be an existing superadmn account.
my $ssa_username = "superadmin";
my $ssa_password = "password";
# ****** FULL PATH TO SERVER LOGFILE ******
# On a few systems it may be necessary to input the full path to your servers logfile
# for the TeamSpeak 2 Anti-Flood Daemon to function normally.
# Example Unix:
# my $server_logfile = "/home/ts2/teamspeak2/server.log";
# Example Windows:
# my $server_logfile = "C:/Program Files/TeamSpeak2/server.log";
my $server_logfile = "/home/teamspeak/teamspeak2/server.log";
# ****** SERVER SPAM LIMITS ******
# These values define the max amount of new connections from an IP address in a limited
# number of seconds.
# Do NOT set one of these values to 0!
# Example:
# my $spam_connections = 3;
# my $spam_seconds = 10;
# In this case an IP address will be able to connect 3 times in 10 seconds.
my $spam_connections = 3;
my $spam_seconds = 10;
# ****** ENABLE/DISABLE UNIX DAEMON ******
# This option allows you to start the script as a background process on Unix based systems
# without using the startscript.
# Do NOT enable this feature on Windows servers.
my $script_daemonize = 0;
How to start the script on Linux:
- Make sure Perl is installed on your system. Usually Perl is installed on dedicated Linux servers by default.
- Simply use the startscript ts2afd_startscript to start the TeamSpeak 2 Anti-Flood Daemon.
How to start the script on Windows:- On Windows servers you'll need to use a ready-to-install distribution like ActivePerl, which is also available for Linux.
- After ActivePerl is installed, double-click the ts2afd.pl to start the TeamSpeak 2 Anti-Flood Daemon.
Hint:
As a small bonus the Zip-archive contains the latest versions of my TeamSpeak 2 Perl modules (
TeamSpeak2::TCPquery and
TeamSpeak2::Log), which I already used to create scripts like the TS2PerlMod.
Have fun!