Author Topic: Restrict number of clients connecting from a single IP  (Read 4307 times)

danmal

  • Posts: 244
  • Turrets: +21/-6
Restrict number of clients connecting from a single IP
« on: April 19, 2009, 02:17:37 am »
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

  • Posts: 2737
  • Turrets: +291/-295
Re: Restrict number of clients connecting from a single IP
« Reply #1 on: April 19, 2009, 04:26:29 am »
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#msg169333
Ok 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

  • Posts: 244
  • Turrets: +21/-6
Re: Restrict number of clients connecting from a single IP
« Reply #2 on: April 19, 2009, 04:37:12 am »
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

  • Guest
Re: Restrict number of clients connecting from a single IP
« Reply #3 on: April 19, 2009, 04:39:28 am »
.:svenbot#:. ? seen those around a lot recently.

Snake

  • Posts: 541
  • Turrets: +43/-110
    • IdeaShock
Re: Restrict number of clients connecting from a single IP
« Reply #4 on: April 19, 2009, 05:59:00 am »
Subnet ban.
.

danmal

  • Posts: 244
  • Turrets: +21/-6
Re: Restrict number of clients connecting from a single IP
« Reply #5 on: April 19, 2009, 06:55:28 am »
.:svenbot#:. ? seen those around a lot recently.

Yep, it's starting to get annoying.

Subnet ban.

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

David

  • Spam Killer
  • *
  • Posts: 3543
  • Turrets: +249/-273
Re: Restrict number of clients connecting from a single IP
« Reply #6 on: April 19, 2009, 10:55:01 am »
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

  • Posts: 244
  • Turrets: +21/-6
Re: Restrict number of clients connecting from a single IP
« Reply #7 on: April 19, 2009, 11:05:08 am »
Hmmm.. alright thanks for that. I'll have a look at the code and see if I can hack something up.