ETMods.net

N!tmod, a Wolfenstein: Enemy Territory Modification!

You are not logged in.

Announcement

You can donate to help us keeping services online.

#1 09-Mar-15 19:17:28

N!trox*
Administrator
Registered: 30-Mar-10
Posts: 1,098

Subnet bans (+ whitelist)

Hi,

Someone has been asking for a better way to handle subnet bans, and allowing exceptions for some IP's.

I've created a simple LUA module that loads the "banlist" from an external file that containts one IP ban/subnet ban/whitelisted IP per line.

You can download it here

To use it, simply modify this line:

banListFile = "/home/server/nitmod/subnetbans.txt" 			-- Absolute path to the IP/Subnet bans list

and point it to the ABSOLUTE path to your banlist file.

Here is what the banlist file syntax looks like:

1.2.*.*
+1.2.3.4

This means:
- IP's in the "1.2.*.*" subnet will not be allowed to connect to the server.
- IP "1.2.3.4" will be allowed (because of the +, which means whitelist), even if it's part of the banned "1.2.*.*" subnet

I'm also planning to add (if really needed) commands to:
- show the current banlist
- add an ip/subnet
- remove an ip/subnet

I hope you like it and that it will help some of you who might have needed this for a while smile


iluvnitmod.png

Offline

Board footer

Powered by FluxBB