List existing chains
Type the following command to list current IPs in tables:
iptables -L -n
To display line number along with other information, enter:
iptables -L INPUT -n --line-numbers
You will get the list of all blocked IP. Look at the number on the left, then use number to delete it. For example delete line number 10 (subner 134.175.0.0/16), enter:
iptables -D INPUT 10
======================================================
Run :
iptables-save| grep xx.xx.xx.xx
to get the exact rule command used to enabled the block. It will be something like:
-A INPUT ! -i lo -s xx.xx.xx.xx -j DROP
Take this command, replace the -A with -D and run it through iptables:
iptables -D INPUT ! -i lo -s xx.xx.xx.xx -j DROP
Type the following command to list current IPs in tables:
iptables -L -n
To display line number along with other information, enter:
iptables -L INPUT -n --line-numbers
You will get the list of all blocked IP. Look at the number on the left, then use number to delete it. For example delete line number 10 (subner 134.175.0.0/16), enter:
iptables -D INPUT 10
======================================================
Run :
iptables-save| grep xx.xx.xx.xx
to get the exact rule command used to enabled the block. It will be something like:
-A INPUT ! -i lo -s xx.xx.xx.xx -j DROP
Take this command, replace the -A with -D and run it through iptables:
iptables -D INPUT ! -i lo -s xx.xx.xx.xx -j DROP
No comments:
Post a Comment