Block IP addresses using IPtables
Block a particular
#service iptables start
#iptables -I INPUT -s 10.1.24.4 -j DROP
This command will simply drop any packet coming from the address 10.1.24.4
To list the chains:
#iptables -L -n
To make persist :
#service iptables status
#iptables-save (copy output)
#emacs /etc/sysconfig/iptables (paste output)
#service iptables restart
make sure iptables service start on default.
#service iptables start
#iptables -I INPUT -s 10.1.24.4 -j DROP
This command will simply drop any packet coming from the address 10.1.24.4
To list the chains:
#iptables -L -n
To make persist :
#service iptables status
#iptables-save (copy output)
#emacs /etc/sysconfig/iptables (paste output)
#service iptables restart
make sure iptables service start on default.
Comments