*DAMN R6
.:Navigation:| Home | Battle League | Forum | Mac Downloads | PC Downloads | Cocobolo Mods |:.

Welcome, Guest. Please login or register.
May 24, 2024, 11:13:21 pm

Login with username, password and session length
Search:     Advanced search
One Worldwide Gaming Community since 13th June 2000
132954 Posts in 8693 Topics by 2294 Members
Latest Member: xoclipse2020
* Home Help Search Login Register
 Ads
+  *DAMN R6 Forum
|-+  *DAMN R6 Community
| |-+  Gaming (All your Gaming needs are here!) (Moderator: *DAMN Hazard)
| | |-+  GhR Server Help
Pages: [1]   Go Down
Print
Author Topic: GhR Server Help  (Read 1152 times)
0 Members and 1 Guest are viewing this topic.
Ace
Resident Ass
God bless the freaks
*****
Offline Offline

Gender: Male
Posts: 1700



« on: February 02, 2003, 10:06:04 pm »

Leave this topic here so more people see it than in the GhR section.

Ok, here is my problem. There are a lot of pricks that come onto my server, tk the shit out of everyone, and then leave before the game ends so I can't ban them. If I know when they leave, I can do "netstat -n -p tcp" to get a list of all tcp connections and compare it from before and after they leave, thus getting the IP for the little bitch. What I want to do is find an automated way that everytime someone joins my server it will run netstat to get the IP of the person that just joined the game. Then I would throw their name and IP into a database, so I would have info for everyone on the server. Then if anyone makes problems, I can just go IP ban them. Also, if I get this to work, later I would be able to expand the DB and keep stats of kills and such for everyone and put it on a webpage. It could be quite nifty.

So anyone who knows something or is willing to help, find me on GR. Everyone else, quit fucking bitching at me about the server if it is down. If you want to see it up, solve this problem.
Logged

There are only 10 types of people in the world. Those who understand binary and those who don't.
Mr. Lothario
Special Forces
God bless the freaks
*****
Offline Offline

Gender: Male
Posts: 1748


Suck mah nuts.


« Reply #1 on: February 02, 2003, 11:34:22 pm »

     I doubt that there's any way to link GhR and netstat so that netstat would be called when GhR sends a signal. You could use a cron to run netstat every 30 seconds or so, but without some way to associate the GhR username with the IP, it's all fairly useless. The coding ninja way of doing it would be to write a program which accepts connections on the GhR join port, interrogates the client to determine their username, stores the username/IP/whatever other information you want, and then forwards the connection to GhR. I know that I damn sure wouldn't want to write that. Heh.
Logged

"How is the world ruled and how do wars start? Diplomats tell lies to journalists and then believe what they read." - 19th-century Austrian press critic Karl Kraus

Rule 37: "There is no 'overkill'. There is only 'open fire' and 'I need to reload'". -- Schlock Mercenary
alaric
Forum Whore
****
Offline Offline

Gender: Male
Posts: 637


What good is life if you don't have freedom?


WWW
« Reply #2 on: February 03, 2003, 01:27:23 am »

I recommend setting up a program called Snort. It's a packet sniffer. You can configure it to log only traffic on a certain port so the logs don't get filled with garbage. It sorts all traffic into seperate folders based on IP. It would be fairly simple to write a script that adds the names of the folders to a database. Run a cronjob with that script and you should be set.

To figure out which IPs are the tkers, just compare the time they log in with the logs, it timestamps everything so it should be no problem. It would be much harder to figure out how to find the person's name automatically. That would involve decoding the game data. It's something we could look at if you want though.

If possible I would set this up on a secondary computer on your network so you can watch what's going on easier and so it doesn't eat precious clock cycles.
Logged

"I would rather have incompetence and abuse of power than a group of people who want to bow down to the French and the United Nations." - BTs Ghostsniper, June 17, 2004, 01:44:16 PM
Ace
Resident Ass
God bless the freaks
*****
Offline Offline

Gender: Male
Posts: 1700



« Reply #3 on: February 03, 2003, 03:49:26 am »

Thanks for the suggestions guys. Actually, shortly after I posted this, a guy called mono contacted me on GR and gave me some very good suggestions. He also recommend snort amongst other things, so I have gotten a basic setup running. I am able to log all connections to my GhR server, which gives me both their name (plaintext woot!) and IP address. I haven't created a database or automated anything yet, but if anyone acts up I can go ban them manually. And since it takes more effort right now, I'm going to permaban these guys. I'll automate it soon when I have more time.

Bwahaha, the server lives again...
Logged

There are only 10 types of people in the world. Those who understand binary and those who don't.
*(SPU) mono
Member
*
Offline Offline

Gender: Male
Posts: 20


smells like napalm, tastes like chicken!


WWW
« Reply #4 on: February 06, 2003, 04:54:28 pm »

hey ace, if you have a working setup, i'd be interested in having a look at it ... especially the rule patterns or the relecant part of the dumps ... i'll try to catch u in GR, or if u like (or if i could help), drop me a note: monoATspuriousDOTbiz, ty!
Logged
Pages: [1]   Go Up
Print
Jump to:  



 Ads
Powered by SMF 1.1.7 | SMF © 2006-2007, Simple Machines LLC
Page created in 0.032 seconds with 17 queries.