Delete an entry from iptables

Use the Below 3 steps to remove an entry from the IPtables :

1. Check the Entry :
iptables-save | grep IP

2. Check the Line number :
iptables -nL -v –line-numbers | grep IP

3. Suppose the Line number is 100, Use the below command to delete the entry :
iptables -D PREROUTING 100

note : here I used the PREROUTING chain. Change it accordingly using the output from step 1.

Enjoy 🙂

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s