Re: not sure if 'iptables -Z' needed/useful/superfluous here..

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 14, 2005 at 08:44:02AM -0800, seberino@xxxxxxxxxxxxxxx wrote:
> Jason
> 
> Thanks for your help.  If I understood you correctly I can do 'iptables -Z'
> to zero out all tables at the same time or I can do
> 
> iptables -t filter -Z
> iptables -t mangle -Z
> iptables -t nat    -Z
> 
> to do tables one at a time right?

  iptables -Z

will only zero out the filter table.  you need to specify "-t nat" and
"-t mangle" if you want to zero those as well.  since this is all
usually done in a script--i use:

  for t in mangle nat filter; do
    iptables -t $t -F
    iptables -t $t -X
    iptables -t $t -Z
  done

but that's just me...i have much love for the loops.

-j

--
"I hope I didn't brain my damage."
        --The Simpsons


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux