Virusold0607 / Python-Scan-Blocker

A Cybersecurity tool to detect and block IPs conducting port scans on a host machine.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ScanBlocker

Python Dependencies

  • View requirements.txt
  • to install automatically run pip install -r requirements.txt

Linux Dependencies

IPTABLES

sudo apt-get install iptables

Usage

sudo python scanBlocker.py

Usage Options

  -H HOSTIP, --hostIP HOSTIP
                        Specify your host inet address. Will default to the
                        inet address of default interface.
  -i INTERFACE, --interface INTERFACE
                        Specify an interface to sniff for port scans on. Will
                        default to system default.
  -c, --clear           Use this flag to clear all blocked IPs before running. 

sudo python scanBlocker -i ens4 -H 10.138.0.27

Clear out iptable rule chain

sudo python scanBlocker -c
or

sudo iptables -F
sudo iptables -X 

View Blocked IP Addresses

Ctrl + C while running
or
sudo iptables -n -L

About

A Cybersecurity tool to detect and block IPs conducting port scans on a host machine.


Languages

Language:Python 100.0%