AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   CIDR Block - Block IP ranges for countries, hackers (https://forums.alliedmods.net/showthread.php?t=225034)

bottiger 08-31-2013 03:23

CIDR Block - Block IP ranges for countries, hackers
 
1 Attachment(s)
Instructions

Have you ever needed to block a hacker that keeps getting a new IP? Have you ever needed to block an entire country? This plugin will do the job.

You can make ban lists with websites like this.

https://www.countryipblocks.net/country_selection.php

The default ban list path is configs/ipblocks.txt

Code:

# example ban list
1.2.3.4/28
4.5.6.7/18
# network 2
5.6.7.8/31

Here is a quick CIDR tutorial.

1.2.3.4/32 = blocks 1.2.3.4 - 1.2.3.4
1.2.3.4/24 = blocks 1.2.3.0 - 1.2.3.255
1.2.3.4/16 = blocks 1.2.0.0 - 1.2.255.255
1.2.3.4/8 = blocks 1.0.0.0 - 1.255.255.255

You can also use the command cidr_add to add blocks in game that will last until a reboot.

Convars

CreateConVar("cidr_path", "configs/ipblocks.txt", "Path to block list.");

Commands

RegAdminCmd("cidr_reload", Command_Reload, ADMFLAG_BAN, "Clear banlist and reload bans from file.");
RegAdminCmd("cidr_clear", Command_Clear, ADMFLAG_BAN, "Clear banlist.");
RegAdminCmd("cidr_add", Command_Add, ADMFLAG_BAN, "Add CIDR to banlist. Does not last between reboots and does not get added to file.");

luki1412 10-29-2013 20:25

Re: CIDR Block - Block IP ranges for countries, hackers
 
Isn't banning the STEAMID enough these days?

ChauffeR 03-20-2014 15:18

Re: CIDR Block - Block IP ranges for countries, hackers
 
Thank you! This is useful.

Alex30555 08-16-2014 12:32

Re: CIDR Block - Block IP ranges for countries, hackers
 
I think after KickClient, you should add a banip with a ServerCommand

IceCucumber 11-10-2014 11:19

Re: CIDR Block - Block IP ranges for countries, hackers
 
I think there's something wrong with the comments detection. With
Quote:

# 1.2.3.4/32 = blocks 1.2.3.4 - 1.2.3.4
# 1.2.3.4/24 = blocks 1.2.3.0 - 1.2.3.255
# 1.2.3.4/16 = blocks 1.2.0.0 - 1.2.255.255
# 1.2.3.4/8 = blocks 1.0.0.0 - 1.255.255.255
123.123.123.123/24
I trigger the LogError("CIDR prefix 0, clamping to 32. %s", cidr_string) at line 133, whereas just
Quote:

123.123.123.123/24
works fine.

Creampuffyness 10-16-2015 18:37

Re: CIDR Block - Block IP ranges for countries, hackers
 
an option to whitelist a certain steamid would be great

Creampuffyness 12-08-2015 15:33

Re: CIDR Block - Block IP ranges for countries, hackers
 
Also a log of the blocked users SteamIDs and IPs would be fantastic

eliteroyal 12-14-2016 19:09

Re: CIDR Block - Block IP ranges for countries, hackers
 
is there any plugin that is still supported?


All times are GMT -4. The time now is 11:17.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.