SRCDS Steam group


Player rate tracking system using Linux's firewall (iptables)
Out of curiosity is the "kicking" functionality still working for this?

I can't seem to get it to kick players who have low rates.
Reply
Yes, the kicking functionality should work. Make sure you don't have the "monitoring mode" enabled.
Reply
(04-05-2011, 07:46 PM)css Wrote:  Yes, the kicking functionality should work. Make sure you don't have the "monitoring mode" enabled.

Code:
my %CONF = (
            logpath => "/var/log/",
            sampleinterval => 10,
            bantime => 1,
            monitoring => 0,
#           immunity => [
#                        { steamid => 'STEAM_X:Y:Z' },
#                        { steamid => 'STEAM_1:2:3', uniqueid => "Admin" },
#                        { uniqueid => 'Ghost' },
#                        { uniqueid => 'Admin' },
#                        { ip => '1.2.3.4' },
#                        { ip => '^192.168.' }, # IPs 192.168.x.x
#                        { ip => '^11.124.' }, # IPs 11.124.x.x
#                        ]
            );

Code:
my %servers =
    (
     1 =>
     {
         name => "My HL2DM Server",
         ip => "x.x.x.x",
         port => 27015,
         rconpass => "xxxx",
         fwchain => "hl2dmtracking",
         ratelimit => 66,
         playerlimit => 1,
         onlinetimelimit => 30,
         samples => 3,
         loginterval => 1,
         htmlfile => "/var/www/ratetable.html",
         players => {}
     }
    );

Those are the settings I'm running, and I made sure it was running under the root user already too, but I tried to get someone to test the settings out and after 10 minutes with rates set to 33 / 33 it wouldn't kick them.
Reply
What do you have in:

Code:
my %CONF = (
            logpath => "/home/user/ratetables/",

Take a look at that directory and see what does it say in "player_1.2.3.4.dat" (where 1.2.3.4 is the IP of the low rate player). You should see the "raw data" for the player.

Take a look at some other players too. If the values don't make any sense (eg. they're 0 or 99999), then the problem is in taking the samples.

My guess is that your test player wasn't long enough online. That's why the system didn't have chance to collect enough statistics to make a accurate decision about the real rate. It takes about 1-2 minutes.
Reply
The log includes lines that show the player running at 33.0 average. This lasted for about 5 minutes before he left.

Code:
[Mon Apr  4 21:41:05 2011] "*" (userid: 14) (steamid: *) (min/median/max 32.9 / 32.9 / 32.9) (100 bytes/pkt) (ping: 136) (loss: 0)$
[Mon Apr  4 21:41:16 2011] "*" (userid: 14) (steamid: *) (min/median/max 32.9 / 33.0 / 33.0) (105 bytes/pkt) (ping: 138) (loss: 0)$
[Mon Apr  4 21:41:26 2011] "*" (userid: 14) (steamid: *) (min/median/max 33.0 / 33.0 / 33.0) (107 bytes/pkt) (ping: 138) (loss: 0)$
[Mon Apr  4 21:41:37 2011] "*" (userid: 14) (steamid: *) (min/median/max 33.0 / 33.0 / 33.0) (106 bytes/pkt) (ping: 139) (loss: 0)$
[Mon Apr  4 21:41:47 2011] "*" (userid: 14) (steamid: *) (min/median/max 32.9 / 32.9 / 32.9) (86 bytes/pkt) (ping: 140) (loss: 0) $
[Mon Apr  4 21:41:58 2011] "*" (userid: 14) (steamid: *) (min/median/max 32.9 / 33.0 / 33.0) (80 bytes/pkt) (ping: 139) (loss: 0) $
[Mon Apr  4 21:42:08 2011] "*" (userid: 14) (steamid: *) (min/median/max 33.0 / 33.0 / 33.0) (98 bytes/pkt) (ping: 138) (loss: 0) $
[Mon Apr  4 21:42:19 2011] "*" (userid: 14) (steamid: *) (min/median/max 33.0 / 33.0 / 33.0) (85 bytes/pkt) (ping: 144) (loss: 0) $
[Mon Apr  4 21:42:30 2011] "*" (userid: 14) (steamid: *) (min/median/max 33.0 / 33.0 / 33.0) (99 bytes/pkt) (ping: 145) (loss: 0) $
[Mon Apr  4 21:42:51 2011] "*" (userid: 14) (steamid: *) (min/median/max 25.1 / 26.4 / 27.7) (93 bytes/pkt) (ping: 142) (loss: 0) $
[Mon Apr  4 21:43:02 2011] "*" (userid: 14) (steamid: *) (min/median/max 27.6 / 30.3 / 32.9) (97 bytes/pkt) (ping: 144) (loss: 0) $
[Mon Apr  4 21:43:12 2011] "*" (userid: 14) (steamid: *) (min/median/max 33.0 / 33.0 / 33.1) (104 bytes/pkt) (ping: 136) (loss: 0)$
[Mon Apr  4 21:43:23 2011] "*" (userid: 14) (steamid: *) (min/median/max 33.0 / 33.0 / 33.0) (96 bytes/pkt) (ping: 138) (loss: 0) $
[Mon Apr  4 21:43:33 2011] "*" (userid: 14) (steamid: *) (min/median/max 33.0 / 33.0 / 33.0) (80 bytes/pkt) (ping: 138) (loss: 0) $
[Mon Apr  4 21:43:44 2011] "*" (userid: 14) (steamid: *) (min/median/max 33.0 / 33.0 / 33.0) (75 bytes/pkt) (ping: 136) (loss: 0) $
[Mon Apr  4 21:43:54 2011] "*" (userid: 14) (steamid: *) (min/median/max 33.0 / 33.0 / 33.0) (75 bytes/pkt) (ping: 137) (loss: 0) $
[Mon Apr  4 21:44:05 2011] "*" (userid: 14) (steamid: *) (min/median/max 33.0 / 33.0 / 33.0) (90 bytes/pkt) (ping: 137) (loss: 0) $
[Mon Apr  4 21:44:15 2011] "*" (userid: 14) (steamid: *) (min/median/max 33.0 / 33.0 / 33.1) (103 bytes/pkt) (ping: 148) (loss: 0)$
[Mon Apr  4 21:44:26 2011] "*" (userid: 14) (steamid: *) (min/median/max 32.9 / 32.9 / 33.0) (100 bytes/pkt) (ping: 146) (loss: 0)$
Reply
Hmm.. strange. It should have worked then.

Maybe you have changed the "playerlimit" setting:

Code:
# playerlimit
#  + The minimum number of players for this system to be active

Maybe you didn't restart the script after making changes to the settings?

Overall it seems you've got the system working OK. In the global log "ratetables.log" you should have line saying "Kicked player XXXX (userid: 123) ...". Do you have those? If not, then the system didn't even try to kick the player. If you have that line, then the system tried to kick the player, but it failed. It would be super strange.

My guess is that you've overlooked some configuration variable. Double-check the settings to be sure.
Reply
(04-06-2011, 05:29 AM)css Wrote:  Hmm.. strange. It should have worked then.

Maybe you have changed the "playerlimit" setting:

Code:
# playerlimit
#  + The minimum number of players for this system to be active

Maybe you didn't restart the script after making changes to the settings?

Overall it seems you've got the system working OK. In the global log "ratetables.log" you should have line saying "Kicked player XXXX (userid: 123) ...". Do you have those? If not, then the system didn't even try to kick the player. If you have that line, then the system tried to kick the player, but it failed. It would be super strange.

My guess is that you've overlooked some configuration variable. Double-check the settings to be sure.

Checked the config again after I set the player limit to 0 and tried the script myself and it still didn't kick me, another user was also present at the time for testing and he ran low rates and it didn't kick him out of the server.

Any other settings to check?

Reply
Did you see the main log file or did you look at the output from the script? Does it say that it tries to kick the player? You can set $DEBUG = 1; in the beginning of the script.
Reply
(04-06-2011, 03:51 PM)css Wrote:  Did you see the main log file or did you look at the output from the script? Does it say that it tries to kick the player? You can set $DEBUG = 1; in the beginning of the script.

I tried turning the debug on and it didn't try to kick.

Also I did check the main log and it only showed the server adding and removing tracking.
Reply
Everything else seems to be fine for you, so it must be something in your immunity settings. Mabe you've defined somethin speicial for the immunity and that's causing the "malfuction".
Reply
Maybe its because I commented out all immunity?
Reply
It shouldn't matter. Maybe you should try with the default config nevertheless. That way you can rule out any configuration error. You need to define the monitored server(s), though.
Reply
(04-08-2011, 10:08 PM)css Wrote:  It shouldn't matter. Maybe you should try with the default config nevertheless. That way you can rule out any configuration error. You need to define the monitored server(s), though.


Okay I'll try the default again but it didn't work with the default last time which is why I changed from the default. :3
Reply
What was the problem with the default config?

Let me know if you get the problem solved. I'm out of ideas what could be the cause. Adding debug messages inside the script and that way tracking the path of the program flow would be good to do, but it can be quite tedious.
Reply
Got it working after commenting out a line that looks at the number of players in the server before kicking. It worked after I commented it out.
Reply


Forum Jump:


Users browsing this thread: 8 Guest(s)