How to check if IP is blocked from Iptables

Check if IP address is blocked:

iptables -L -n --line | grep [IP_Address]

If IP address appear as DROP or REJECT, it is blocked.

Unblock IP address from incoming connections

iptables -I INPUT -s [IP_Address] -j ACCEPT

 

Block IP address from incoming connections

# iptables -A INPUT -s [IP_Address] -j DROP

 

Leave a Reply

Your email address will not be published. Required fields are marked *

*