Help need :) How to delete all rules in chain ?
opie at 817west.com
Tue Sep 28 17:57:24 CEST 2004
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
Jason Opperisano <opie at 817west.com>
More information about the netfilter