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:
!ban ip=aa.bb.cc.dd-ww.xx.yy.zz
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.
-MajorB
Banning a range of ips
Moderators: Moderators, Lobby Developers, SPADS AutoHost
Re: Banning a range of ips
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.
Thank you.
Re: Banning a range of ips
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 10.20.30.0 - 10.20.30.255.
First you ban his main account:
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):
Of course you will still need to add exceptions for any legitimate new users (rank=0) coming from this IP range.
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 10.20.30.0 - 10.20.30.255.
First you ban his main account:
Code: Select all
!ban BadUser
Code: Select all
!ban ip=10.20.30.0-10.20.30.255;rank=0