Unblock an IP from IPTABLES


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
 

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

About Sarath

A Techie from Kochi, India with 8+ years of experience in Linux and Windows server administration. I learn new things almost everyday and I enjoy the fun of learning and sharing my knowledge.