Wednesday, June 15, 2011

Iptables Unblock/delete

Display the List existing chains Entry
iptables -L –n
iptables -L -n -v
iptables -L chain-name -n -v
iptables -L spamips -n –v

Display List existing chains with line number
iptables -L INPUT -n –line-numbers
iptables -L OUTPUT -n –line-numbers
 iptables -L spamips -n -v –line-numbers

Delete Rule from IPTABLES using line number
iptables -D INPUT linunumber
Example : iptables -D INPUT 11

You can also use the Below syntax to delete / unblock an IP 
iptables -D INPUT -s ipaddress -j DROP