Help need :) How to delete all rules in chain ?
aospan at netup.ru
Wed Sep 29 01:29:20 CEST 2004
thanks for replay :)
I see this way already, but it need to make some help scripts which not
> On Tue, 2004-09-28 at 15:48, 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 ?
> > wbr, Abylai
> AFAIK, there is no way to make "-D" delete multiple, identical rules.
> if you have that rule in there multiple times, hit <up-arrow><enter> a
> few times until you get:
> iptables: Bad rule (does a matching rule exist in that chain?)
> if you use a script to flush/reload rules, you normally won't run into
> this situation.
More information about the netfilter