Wednesday, May 19, 2010

Ip Block and Unblock

Through IP tables

iptables -nL |grep 96.252.13.66

The above command used to grep the particular ip from the iptables.

iptables -A INPUT -s 96.252.13.66 -j ACCEPT


The above command used to ALLOW the IP for our server

iptables -D INPUT -s 96.252.13.66 -j DROP

The above command used to DROP the IP for our server

Through CSF firewall

You can do the same operation through CSF firewall also

csf -r --> Used to Restart the CSF firewall>

csf -d ip -->Used to Deny the IP for our server

csf -a ip -->Used to Allow the IP for our Server

1 comment: