Banning a range of ips

Banning a range of ips

SpringRTS Perl Autohost for Dedicated Server

Moderators: Moderators, Lobby Developers, SPADS AutoHost

Post Reply
Posts: 17
Joined: 24 Nov 2013, 09:14

Banning a range of ips

Post by MajBoredom »

A recent troublemaker inspired me to investigate netmask banning in SPADS.

Fortunately, I did not have to write a patch for this as there is some existing functionality. It is not well documented so I am posting about it here. You can ban an inclusive range of ips with the following syntax:


Note the hyphen to indicate a range.

Using this command you can ban entire subnets. This is useful if an offensive person uses DHCP to reacquire a new IP after being banned. Use with caution, as you can ban very wide subnets (or even the entire internet) with this command.

0 x

User avatar
Journeywar Developer & Mapper
Posts: 10312
Joined: 24 Jan 2006, 21:12

Re: Banning a range of ips

Post by PicassoCT »

Svedes always were to good(eh) - had to go - its nothing (i)personal advocate, but sometimes the ranged measures justify the cause. I had no complains of svedes about this on my server.

Thank you.
0 x

User avatar
Lobby Developer
Posts: 913
Joined: 06 Dec 2007, 11:12

Re: Banning a range of ips

Post by bibim »

As shown in the !ban command examples, you can indeed use the "-" character to specify a range of values instead of a single value (for any integer or IP address value).

But if you use this to ban IP ranges, I recommend to combine it with rank based filters. That way you only ban new accounts coming from this range. So if there are existing legitimate users using same IP range, they won't be banned.
You can combine filters by using the ";" character to separate them (it will use a AND logic to combine them, cf !ban command examples).

So for example, let's say you want to ban "BadUser" who is using dynamic IP from range -
First you ban his main account:

Code: Select all

!ban BadUser
But this is not enough, because he keeps coming back with new accounts. So you need to ban his entire IP range(s), without banning other existing users from same IP range(s):

Code: Select all

!ban ip=;rank=0
Of course you will still need to add exceptions for any legitimate new users (rank=0) coming from this IP range.
0 x

Post Reply

Return to “SPADS AutoHost”