Skip to contentSkip to conversation

-i and -o options for iptables FORWARD chain

DISCUSSION Gongya Yu 3 participants 5 messages Dec 31, 2003 – Jan 2, 2004

lore
Share & tools
lore

Gongya Yu

author
#0 lore raw

Hi, I just updated Linux kernel to 2.6.0 with iptables and ebtables enabled.

But iptables ignores -i and -o options for FORWARD chain. Wheneneve I use something like -i eth0 or -o eth0, the rule is just ignored.

Any suggestions ?

thanks in advance!!

Gongya Yu

#1 lore raw
Quoted 7 lines · Gongya Yu

Hi, I just updated Linux kernel to 2.6.0 with iptables and ebtables enabled.

But iptables ignores -i and -o options for FORWARD chain. Wheneneve I use something like -i eth0 or -o eth0, the rule is just ignored.

Any suggestions ?

I am not a 2.6 expert by any means, so this is just a suggestion: did you recompile the userspace tools (iptables) to match the new kernel code (netfilter)?

Antony.

Signature · 5 lines
My New Year's resolution is not to make any resolutions I can't keep.

I'm wondering whether I've failed already.
                                                     Please reply to the list;
                                                           please don't CC me.
#2 lore raw
In reply to Gongya Yu

am Wed, dem 31.12.2003, um 15:36:34 -0800 mailte Gongya Yu folgendes:

Quoted 1 line

Hi, I just updated Linux kernel to 2.6.0 with iptables and ebtables enabled.

I'm using iptables on 2.4.x, possible there are differences with 2.6.x.

Quoted 3 lines

But iptables ignores -i and -o options for FORWARD chain. Wheneneve I use something like -i eth0 or -o eth0, the rule is just ignored.

RTFM!

-i is only for INPUT, FORWARD and PREROUTING
-o is only for FORWARD, OUTPUT and POSTROUTING

You can use -s and -d (Source and Destination-IP).

Andreas

Signature · 4 lines
Diese Message wurde erstellt mit freundlicher Unterstützung eines freilau-
fenden Pinguins aus artgerechter Freilandhaltung.   Er ist garantiert frei
von Micro$oft'schen Viren. (#97922 http://counter.li.org)     GPG 7F4584DA
Was, Sie wissen nicht, wo Kaufbach ist? Hier: N 51.05082°, E 13.56889° ;-)
#3 lore raw

Review

Quoted 13 lines · Andreas Kretschmer

am Wed, dem 31.12.2003, um 15:36:34 -0800 mailte Gongya Yu folgendes:

Quoted 2 lines

Hi, I just updated Linux kernel to 2.6.0 with iptables and ebtables enabled.

I'm using iptables on 2.4.x, possible there are differences with 2.6.x.

Quoted 2 lines

But iptables ignores -i and -o options for FORWARD chain. Wheneneve I use something like -i eth0 or -o eth0, the rule is just ignored.

RTFM!

(quoted diff) +0 -2
-i is only for INPUT, FORWARD and PREROUTING
-o is only for FORWARD, OUTPUT and POSTROUTING

Are you suggesting that -i and -o cannot be used in FORWARD? As far as I can
see the syntax of the rule Gonya posted is perfectly okay.

Antony.

Signature · 5 lines
Christmas is an opportunity to upgrade to kernel 2.6 while no-one's around to 
notice the downtime.

                                                     Please reply to the list;
                                                           please don't CC me.
#4 lore raw

am Fri, dem 02.01.2004, um 14:03:02 +0000 mailte Antony Stone folgendes:

Quoted 5 lines

Review

Quoted 2 lines
(quoted diff) +0 -2
-i is only for INPUT, FORWARD and PREROUTING
-o is only for FORWARD, OUTPUT and POSTROUTING

Are you suggesting that -i and -o cannot be used in FORWARD? As far as I can
see the syntax of the rule Gonya posted is perfectly okay.

Oh, i'm sorry, parse error by me =:-(

Andreas

Signature · 4 lines
Diese Message wurde erstellt mit freundlicher Unterstützung eines freilau-
fenden Pinguins aus artgerechter Freilandhaltung.   Er ist garantiert frei
von Micro$oft'schen Viren. (#97922 http://counter.li.org)     GPG 7F4584DA
Was, Sie wissen nicht, wo Kaufbach ist? Hier: N 51.05082°, E 13.56889° ;-)