* top level rules
@ 2003-05-12 12:25 Patrick Ahler
2003-05-12 12:49 ` Filip Sneppe
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Patrick Ahler @ 2003-05-12 12:25 UTC (permalink / raw)
To: netfilter EMAIL
Is there any way to insert a new rule at the top of a table...
For instance, I have rules...
RULE 1
RULE 2
RULE 3
RULE 4
in order... but what if I want to place a rule before rule 1? Is that
possible?
Thanks,
-Patrick
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: top level rules
2003-05-12 12:25 top level rules Patrick Ahler
@ 2003-05-12 12:49 ` Filip Sneppe
2003-05-12 13:24 ` Moti Levy
2003-05-12 13:06 ` Ray Leach
` (2 subsequent siblings)
3 siblings, 1 reply; 6+ messages in thread
From: Filip Sneppe @ 2003-05-12 12:49 UTC (permalink / raw)
To: Patrick Ahler; +Cc: netfilter EMAIL
On Mon, 2003-05-12 at 14:25, Patrick Ahler wrote:
> Is there any way to insert a new rule at the top of a table...
>
> For instance, I have rules...
>
> RULE 1
> RULE 2
> RULE 3
> RULE 4
>
> in order... but what if I want to place a rule before rule 1? Is that
> possible?
Yes, just use the -I (insert) option of iptablesinstead of -A (append).
Regards,
Filip
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: top level rules
2003-05-12 12:49 ` Filip Sneppe
@ 2003-05-12 13:24 ` Moti Levy
0 siblings, 0 replies; 6+ messages in thread
From: Moti Levy @ 2003-05-12 13:24 UTC (permalink / raw)
To: netfilter EMAIL
iptables -L -n --line0numbers will list the rule numbers
iptables -I CHAINNAME rulenumber_to_insert REST OF RULE
----- Original Message -----
From: "Filip Sneppe" <filip.sneppe@cronos.be>
To: "Patrick Ahler" <patrick@vikus.com>
Cc: "netfilter EMAIL" <netfilter@lists.netfilter.org>
Sent: Monday, May 12, 2003 8:49 AM
Subject: Re: top level rules
> On Mon, 2003-05-12 at 14:25, Patrick Ahler wrote:
> > Is there any way to insert a new rule at the top of a table...
> >
> > For instance, I have rules...
> >
> > RULE 1
> > RULE 2
> > RULE 3
> > RULE 4
> >
> > in order... but what if I want to place a rule before rule 1? Is that
> > possible?
>
> Yes, just use the -I (insert) option of iptablesinstead of -A (append).
>
> Regards,
> Filip
>
>
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: top level rules
2003-05-12 12:25 top level rules Patrick Ahler
2003-05-12 12:49 ` Filip Sneppe
@ 2003-05-12 13:06 ` Ray Leach
2003-05-12 13:07 ` Rob Sterenborg
2003-05-12 13:08 ` Zander
3 siblings, 0 replies; 6+ messages in thread
From: Ray Leach @ 2003-05-12 13:06 UTC (permalink / raw)
To: netfilter EMAIL
[-- Attachment #1: Type: text/plain, Size: 537 bytes --]
From the netfilter help (iptables --help)
"
--insert -I chain [rulenum]
Insert in chain as rulenum (default
1=first)
"
So ... iptable -I instead of iptables -A ....
On Mon, 2003-05-12 at 14:25, Patrick Ahler wrote:
> Is there any way to insert a new rule at the top of a table...
>
> For instance, I have rules...
>
> RULE 1
> RULE 2
> RULE 3
> RULE 4
>
> in order... but what if I want to place a rule before rule 1? Is that
> possible?
> Thanks,
> -Patrick
>
>
>
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread* RE: top level rules
2003-05-12 12:25 top level rules Patrick Ahler
2003-05-12 12:49 ` Filip Sneppe
2003-05-12 13:06 ` Ray Leach
@ 2003-05-12 13:07 ` Rob Sterenborg
2003-05-12 13:08 ` Zander
3 siblings, 0 replies; 6+ messages in thread
From: Rob Sterenborg @ 2003-05-12 13:07 UTC (permalink / raw)
To: 'netfilter EMAIL'
> Is there any way to insert a new rule at the top of a table...
iptables -I INPUT 1 ...
See : man iptables.
Gr,
Rob
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: top level rules
2003-05-12 12:25 top level rules Patrick Ahler
` (2 preceding siblings ...)
2003-05-12 13:07 ` Rob Sterenborg
@ 2003-05-12 13:08 ` Zander
3 siblings, 0 replies; 6+ messages in thread
From: Zander @ 2003-05-12 13:08 UTC (permalink / raw)
To: Patrick Ahler; +Cc: netfilter EMAIL
On Monday, May 12, 2003, at 13:25 Europe/London, Patrick Ahler wrote:
> Is there any way to insert a new rule at the top of a table...
>
> For instance, I have rules...
>
> RULE 1
> RULE 2
> RULE 3
> RULE 4
>
> in order... but what if I want to place a rule before rule 1? Is that
> possible?
> Thanks,
> -Patrick
/sbin/iptables -I <table> 1........
you can substitute the number for any position in the table: 2, 3 4 etc
etc.
cheers
Zander
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-05-12 13:24 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-12 12:25 top level rules Patrick Ahler
2003-05-12 12:49 ` Filip Sneppe
2003-05-12 13:24 ` Moti Levy
2003-05-12 13:06 ` Ray Leach
2003-05-12 13:07 ` Rob Sterenborg
2003-05-12 13:08 ` Zander
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.