To check if an IP is blocked in iptables, use the command :
# iptables -nL | grep IP
Sample output :
DROP all -- x.x.x.x 0.0.0.0/0
If the IP is blocked in iptables, to see the rule :
iptables-save|grep IP
Sample output :
-A LOCALINPUT -s x.x.x.x -i eth0 -j DROPTake the results and replace "-A" with "-D" and run it with iptables
Eg : iptables -D LOCALINPUT -s x.x.x.x -i eth0 -j DROP
# iptables -nL | grep IP
Sample output :
DROP all -- x.x.x.x 0.0.0.0/0
If the IP is blocked in iptables, to see the rule :
iptables-save|grep IP
Sample output :
-A LOCALINPUT -s x.x.x.x -i eth0 -j DROPTake the results and replace "-A" with "-D" and run it with iptables
Eg : iptables -D LOCALINPUT -s x.x.x.x -i eth0 -j DROP
0 comments: