IPTables + Bashrc Shortcut

We All know IPTables and well be a bitch… so by adding the following lines to your /etc/bash/bashrc   and/or ~/.bashrc

You can easy block ips on the Table Level Thats(PINGs, and all Data in and out) You wound really need a fast way to add Ip blocks and Table Level when a DDos, Floodnet, Clonenet eg…

How to Use,

First Your Going to need to have iptables installed
Gentoo: emerge iptables   (Must be  Root to use/install iptables)
Ubuntu: sudo apt-get install iptables

  • “blockedips” Will Show all Blocked hosts
  • “blockip IPHERE” Will Block that ip
  • “unblockip IPHERE” Unblocks that ip

Enter this code into /etc/bash/bashrc or ~/.bashrc   then source /etc/bash/bashrc  and/or ~/.bashrc
Code:

# http://thegeekoftheworld.com/
alias blockedips=”iptables -L”
alias blockip=”iptables -I INPUT -j DROP -s ”
alias unblockip=”iptables -D INPUT -j DROP -s ”

#Code  Thats it!  TEST….

bashskiptabletest-rootredfire

Tags: , , , , , , , , , , , , , , , , , , , , , ,