Andrew Latham

Ban and Unban Bash aliases to add to system profile or bashrc that will ban, unban and list source addresses to drop with IPTABLES.

alias ban='iptables -I INPUT -j DROP -s'
alias unban='iptables -D INPUT -j DROP -s'
alias banlist='iptables -L | grep DROP'

Usage would be

# ban
# banlist
DROP       all  --      anywhere
# unban
# banlist
# echo "yeah IP Ban is removed"