Re: Help need :) How to delete all rules in chain ?

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

 



Abylai Ospan wrote:
Hello, all !

May be this question in FAQ but I can't find it ;-( I have 3 (or more)
identical rules in one (for example - INPUT) chain.
If I do command:
iptables -D FORWARD -s 10.0.0.10 -d 10.0.0.20 -j ACCEPT


the first rule is deleted only. Is there any command line option to
remove all identical rules in one chain ?

No such options. But nothing prevents you from doing it in loop:

while iptables -D FORWARD insert options here -j ACCEPT 2>/dev/null
do
   : # do nothing
done

Just don't call me script kiddie ;-)

--
Aleksandar Milivojevic <amilivojevic@xxxxxx>    Pollard Banknote Limited
Systems Administrator                           1499 Buffalo Place
Tel: (204) 474-2323 ext 276                     Winnipeg, MB  R3T 1L7


[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