how to delete some iptables items

Adalbert Prokop adalbert.prokop at gmx.de
Sun Apr 13 18:53:11 UTC 2008


Y Uanlux schrieb:

> I followed some online instruction and set iptables rules (as below)  
> from iptable -L -t nat.

> I want delete the last item. What's the command line to do this using 
> iptables?

You need the line number of the rule you are going to delete

iptables -L -t nat --line-numbers

Then you must use

iptables -t nat -D <chain> <line_number>

Chain can be PREROUTING, POSTROUTING or OUTPUT - you did not mention in 
which chain your rules reside.

-- 
Adalbert Prokop   -=O=-   PGP key available
E-Mail: adalbert.prokop.at.gmx.de




More information about the fedora-list mailing list