To check if an IP is blocked in iptables, use the command :
# iptables -nL | grep IP_ADDRESS_HERE
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_ADDRESS_HERE
# iptables-save|grep 192.168.101.8
Sample output
: -A LOCALINPUT -s 192.168.101.8 -i eth0 -j DROP
Sample output
: -A LOCALINPUT -s 192.168.101.8 -i eth0 -j DROP
Take the results and replace “-A” with “-D” and run it with iptables.
Eg:
# iptables -D LOCALINPUT -s 192.168.101.8 -i eth0 -j DROP
# iptables -D LOCALINPUT -s 192.168.101.8 -i eth0 -j DROP
COMMENTS