kama skrev 2010-08-20 10:05:
On Fri, 20 Aug 2010, Magnus Ringdahl wrote:
Hi.
I was wondering if anyone else was monitoring their gameserver traffic
and their clients ip-addresses?
I would like to figure out from which top ten ASN my clients come from.
I thought about running netstat at first, but since it can't report
client ip-addresses on UDP that failed.
Then i figured that perhaps iptables logging options would do the trick,
or perhaps tcpdump.
But i don't know whats best, so im turning to you guys, to see if anyoe
else have done this.
My goal is to be able to see the connected clients ip-addresses and run
a script every x min, compari it to a RIR o get the ASN.
And then list which ASN that has most connections to my gameservers.
Hi!
There are several ways of doing this.
These three comes into my mind, but there might be other ways.
1. Create a plugin (sourcemod or amxmodx) that saves all the ip's and
parse that afterwards.
2. Send logs to a daemon that parse each logmessage and record the ip
(logaddress_add). Writing the daemon should not be that difficult. You
can probably use inetd to handle the connections and just parse the
messages with a simple script.
3. parse the logs in the logdirs and record the ip's.
I hope you have a local copy of the ASN list. Otherwise you might be
blacklisted when you do a lot of queries.
I would also suggest that you have everything in a DB and do a local
lookup there before sending a query.
/Bjorn
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlds_linux
I don't run, and i whon't un metamod/sourcemod for this task.
So that option is out of the question.
If i use the logging of hlds, then my customers may alter that from
rcon. So that is also not an option.
I can't rely on hlds or any of it's settings/features.
I need to fetch the information systemwise. Running Debian Lenny x86_64
on all my servers.
No one ever done iptables logging och tcpdump for this?
Kind Regards
M
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlds_linux