Skip to content

47solar/ip_lit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 

Repository files navigation

This is a beta version of the script

A simplified version of iptables.

  • Blocking a specific sequence of bytes on a specific port;
  • Blocking a specific port;
  • Filter the number of connections to a specific port;
  • Unblocking a port or bytes;
  • View the list of blocks.

You must have iptables pre-installed !

Clone IpLit

git clone https://github.com/47solar/ip_lit.git
cd ip_lit

Example use

Image alt

Ban request "attack" on port 80

./IpLit.sh -b INPUT -P udp -p 80 -w "attack"

Ban requests to port 80

./IpLit.sh -b OUTPUT -P tcp -p 80

Limiting the number of connections to a specific port

./IpLit.sh --filter OUTPUT --protocol tcp --port 443 --quan 3

Unban first chain

./IpLit.sh -u INPUT 1

Arguments

--ban        -b         add port or word to the blacklist
        INPUT           incoming traffic
        OUTPUT          outgoing traffic
        FORWARD         traffic passing through the system
--unban      -u         unlock the word or port
        INPUT, OUTPUT, FORWARD
        [name or num]               like --unban INPUT 4
--port       -p         specify the required port
--protocol   -P         data transfer protocol (tcp, udp, etc...)
--word       -w         argument is the desired word
                                    like --word "porn"
--list       -L         displays a list of all locks
--filter     -f         limiting the number of connections to a specific port
    --quan       -a         number of connections"

Created by @47solar

Telegram : tungue