Tremulous Forum

Community => Servers => Topic started by: danmal on April 19, 2009, 02:17:37 am

Title: Restrict number of clients connecting from a single IP
Post by: danmal 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.
Title: Re: Restrict number of clients connecting from a single IP
Post by: kevlarman 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.
Title: Re: Restrict number of clients connecting from a single IP
Post by: danmal 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?
Title: Re: Restrict number of clients connecting from a single IP
Post by: Archangel on April 19, 2009, 04:39:28 am
.:svenbot#:. ? seen those around a lot recently.
Title: Re: Restrict number of clients connecting from a single IP
Post by: Snake on April 19, 2009, 05:59:00 am
Subnet ban.
Title: Re: Restrict number of clients connecting from a single IP
Post by: danmal 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.
Title: Re: Restrict number of clients connecting from a single IP
Post by: David 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.
Title: Re: Restrict number of clients connecting from a single IP
Post by: danmal 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.