how to delete some iptables items

Tim ignored_mailbox at yahoo.com.au
Fri Apr 11 15:12:15 UTC 2008


On Fri, 2008-04-11 at 23:18 +1000, Y Uanlux wrote:
> I followed some online instruction and set iptables rules (as below)  from iptable -L -t nat.
> DNAT       tcp  --  anywhere             anywhere           tcp dpt:119 to:192.168.1.4:119 
> DNAT       udp  --  anywhere             anywhere           udp dpt:446 to:192.168.1.7:446 
> DNAT       tcp  --  anywhere             anywhere           tcp dpt:446 to:192.168.1.7:446 
> 
> DNAT       tcp  --  anywhere             anywhere           tcp dpt:446 to:192.168.1.4:446 
> 
> I want delete the last item. What's the command line to do this using iptables? 

Just as you use the --append (or -A) command to add a rule, you use the
--delete (or -D) to delete a rule.  Issue the same command line,
substituting the delete command for the append one.  If you cannot
remember the command line you originally used, just make up a new one
with the same rule parameters. 

See man iptables

-- 
(This computer runs FC7, my others run FC4, FC5 & FC6, in case that's
 important to the thread.)

Don't send private replies to my address, the mailbox is ignored.
I read messages from the public lists.




More information about the users mailing list