Raised This Month: $32 Target: $400
 8% 

CIDR Block - Block IP ranges for countries, hackers


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author
bottiger
AlliedModders Donor
Join Date: Dec 2010
Plugin ID:
3865
Plugin Version:
1.0
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    10 
    Plugin Description:
    Block IP ranges with CIDR notation.
    Old 08-31-2013 , 03:23   CIDR Block - Block IP ranges for countries, hackers
    Reply With Quote #1

    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.");
    Attached Files
    File Type: sp Get Plugin or Get Source (cidr.sp - 1579 views - 4.2 KB)
    __________________
    bottiger is offline
     



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 15:03.


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