To check if an IP is blocked in iptables, use the command :
Code: [Select]
# 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 :
Code: [Select]
iptables-save|grep IP
Sample output :
-A LOCALINPUT -s x.x.x.x -i eth0 -j DROP
Take 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
Code: [Select]
# 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 :
Code: [Select]
iptables-save|grep IP
Sample output :
-A LOCALINPUT -s x.x.x.x -i eth0 -j DROP
Take 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
No comments:
Post a Comment