News:

Come Chat with us live! Learn how HERE!

Main Menu

Restrict number of clients connecting from a single IP

Started by danmal, April 19, 2009, 02:17:37 AM

danmal

Basically I'm wondering if it's possible to restrict the number of clients that can connect from a single ip address. So if I had an option of say maxClientsPerIP and then set it to 4 then only a maximum of 4 clients from a single IP could connect. If a 5th client tried to connect then they'd just fail to connect.

Thanks for any help anyone can provide.

kevlarman

there isn't any code that allows this currently, i've done this in the past with iptables' iplimit module though.
Quote from: Asvarox link=topic=8622.msg169333#msg169333Ok let's plan it out. Asva, you are nub, go sit on rets, I will build, you two go feed like hell, you go pwn their asses, and everyone else camp in the hallway, roger?
the dretch bites.
-----
|..d| #
|.@.-##
-----

danmal

Thanks for the reply. I don't have access to the firewall/iptables on the server though. Do you have any idea how else I could achieve this? Only reason I want to know is that someone keeps spamming my server full of 'false' players. They just sit in spec and time out after a while. Would it be very difficult to add an option to the QVM that could limit the number of players connecting through the same IP?

Archangel


Snake

.

danmal

Quote from: Archangel on April 19, 2009, 04:39:28 AM
.:svenbot#:. ? seen those around a lot recently.

Yep, it's starting to get annoying.

Quote from: Snake on April 19, 2009, 05:59:00 AM
Subnet ban.

Won't work as I think at least 2 people are involved and the subnet keeps changing with the IP.

David

iptables and mod connlimit are the only real option.
Adding a limit in the QVM would probably be doable, but AFAIK its not been done yet.
Any maps not in the MG repo?  Email me or come to irc.freenode.net/#mg.
--
My words are mine and mine alone.  I can't speak for anyone else, and there is no one who can speak for me.  If I ever make a post that gives the opinions or positions of other users or groups, then they will be clearly labeled as such.
I'm disappointed that people's past actions have forced me to state what should be obvious.
I am not a dev.  Nothing I say counts for anything.

danmal

Hmmm.. alright thanks for that. I'll have a look at the code and see if I can hack something up.