Giter VIP home page Giter VIP logo

cidr-blocker's Introduction

CIDR Blocker

Blocks CIDR (Classless Inter-Domain Routing) IP Ranges


Console Commands

  • sm_cidr_ban <ip> <ban reason> <comment> Ban a CIDR (Example: sm_cidr_ban "89.108.121.0/24" "Blocked IP" "Reg.ru")
  • sm_cidr_ban <ip> <ban reason> <comment> Unban a CIDR (Example: sm_cidr_unban "89.108.121.0/24")
  • sm_cidr_whitelist <ip/steamid2> <comment> Ban a CIDR (Example: sm_cidr_whitelist "89.108.121.120" "Exception for me because i said so" or sm_cidr_whitelist "STEAM_0:1:522065531")

ConVar

  • sm_cidr_log Enable blocked logging [Default: 0.0] (Min: 0.0) (Max: 1.0)

Database Structure

CIDR_LIST

  • id - Auto incremental ID (Filled in automatically)

  • cidr - CIDR to block

  • kick_message - Message to display when kicked

  • comment - Helps you keep track

CIDR_WHITELIST

  • id - Auto incremental ID (Filled in automatically)

  • type - Whitelist type (steam OR ip)

  • identity - Depending on the whitelist type (steamid32 OR IP)

  • comment - Helps you keep track

CIDR_LOG (Used when sm_cidr_log is 1.0)

  • id - Auto incremental ID (Filled in automatically)

  • ip - Client's connecting IP

  • steamid - Client's SteamID32

  • name - Client's connecting name

  • cidr - CIDR that was triggered

  • time - Time it was blocked

Installation

  1. Extract CIDR_Blocker.smx to /addons/sourcemod/plugins
  2. Create cidr_blocker entry in your database.cfg
  3. (Optional | Recommended) Import https://github.com/CIDR-Blocker/CIDR-Blocker/blob/master/imports/datacenters.sql into cidr_list table

Download

Download the latest version from the release page

Resources

License

GPL-3.0

Icon made by Freepik from http://www.flaticon.com/

cidr-blocker's People

Contributors

rumblefrog avatar dependabot[bot] avatar theratest avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.