All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: netfiltering and ethernet bridging doesn't appear to work as advertised, help!
@ 2004-01-21 14:55 bmcdowell
  2004-01-21 16:34 ` Kirk Reiser
  0 siblings, 1 reply; 8+ messages in thread
From: bmcdowell @ 2004-01-21 14:55 UTC (permalink / raw)
  To: netfilter


I can attest that it does work.  Hang in there.

As for patching, it is my understanding that the statement about 'newer
kernels' is only half right.  You do not need to patch your kernel to
add bridging functionality (just enable it in the menu).  You DO need to
patch it if you want to use netfilter to filter said bridge traffic.  I
use this patch:
http://bridge.sourceforge.net/devel/bridge-nf/bridge-nf-0.0.7-against-2.
4.19.diff

With only that patch, I have successfully enabled bridges netfilter
under both RedHat 7.3 and 9.

To clarify a tad on the chains, INPUT and OUTPUT refer to traffic for
and from the firewall itself.  FORWARD refers to traffic crossing the
firewall.  These are two separate things and the rules do not effect
chains they aren't applied to.  For example, your rule...

	iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-v

...needs a FORWARD counterpart (if you also want that behavior on
traffic crossing the firewall):

	iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j
ACCEPT -v

Also your policy on FORWARD is accept.  Your post didn't show any
FORWARD drop rules, so if traffic is passing right through the firewall
with these rules, well, it's working correctly.  On the other hand, if
you switch them all to FORWARD then there is no filtering on traffic to
the firewall.

Hope that helps.


Bob


^ permalink raw reply	[flat|nested] 8+ messages in thread
* RE: netfiltering and ethernet bridging doesn't appear to work as advertised, help!
@ 2004-01-21 17:27 bmcdowell
  0 siblings, 0 replies; 8+ messages in thread
From: bmcdowell @ 2004-01-21 17:27 UTC (permalink / raw)
  To: netfilter


From my point of view, you can ignore physical/virtual interfaces with
respect to INPUT, OUTPUT, and FORWARD.  It's all about where the IP
address resides, and whether or not that IP is local or remote.  Let me
whip up a quick example.

Say we have a bridging firewall with two ethX interfaces and one brX
interface:

eth0-br0-eth1

Not that you would normally want to, but lets put IP's on all of these
interfaces:

eth0(10.10.10.1)-br0(10.10.10.2)-eth1(10.10.10.3)

Now lets add a few clients:

client1(10.10.10.5) -
[eth0(10.10.10.1)-br0(10.10.10.2)-eth1(10.10.10.3)] -
client2(10.10.10.6)

With me so far?

Now let's apply those to filter chains.  Examples:

	Situation				Chain (from the point of
view of the bridge)

Client1 pings Client2			FORWARD
Client2 pings Client1			FORWARD
Client1 pings 10.10.10.1		INPUT (and OUTPUT for the reply)
Client1 pings 10.10.10.2		INPUT (and OUTPUT for the reply)
Client1 pings 10.10.10.3		INPUT (and OUTPUT for the reply)
Client2 pings 10.10.10.1		Probably INPUT/OUTPUT - not sure
here

It isn't recommended to have IP's on ethX's.  Really, my bridge should
look more like this:

eth0(0.0.0.0)-br0(10.10.10.2)-eth1(0.0.0.0)

In this case, only traffic dealing with 10.10.10.2 would be handled by
the INPUT/OUTPUT chains.  Everything else is FORWARD, because it deals
with two non-local IPs.

Have I confused you yet?


Bob

-----Original Message-----
From: Kirk Reiser [mailto:kirk@braille.uwo.ca]
Sent: Wednesday, January 21, 2004 10:35 AM
To: Bob McDowell
Cc: netfilter@lists.netfilter.org
Subject: Re: netfiltering and ethernet bridging doesn't appear to work
as advertised, help!

<SNIP>
I'm having a bit of trouble with this statement because to me it
doesn't seem to make sense without the notion of the interface cards.
If eth0 is our interface to the net and eth1 our interface to the lan
then input to an interface makes sense because input to eth0 means one
set of rules while input to eth1 means a totally separate set.  When
you are talking about a virtual interface such as br0 how do input and
output relate?  Is input meaning packets entering both real interfaces
eth0 and eth1 or does input mean to the virtual device br0.  If the
latter what direction is input verses output, the order you add the
NICs?  I don't see how this can be.
<SNIP>


^ permalink raw reply	[flat|nested] 8+ messages in thread
* Exempt one IP from DNAT for the whole network
@ 2004-01-21 11:08 alok.shukla
  2004-01-21 12:19 ` netfiltering and ethernet bridging doesn't appear to work as advertised, help! Kirk Reiser
  0 siblings, 1 reply; 8+ messages in thread
From: alok.shukla @ 2004-01-21 11:08 UTC (permalink / raw)
  To: netfilter

[-- Attachment #1: Type: text/html, Size: 711 bytes --]

[-- Attachment #2: Type: text/plain, Size: 127 bytes --]

Powered by Xgen(Next Generation Email Client)
http://www.datainfosys.com
Do not remove this:[XGEN]210120043820224284:NM[-XGEN-]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-01-22  0:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-21 14:55 netfiltering and ethernet bridging doesn't appear to work as advertised, help! bmcdowell
2004-01-21 16:34 ` Kirk Reiser
2004-01-22  0:10   ` Philip Craig
  -- strict thread matches above, loose matches on Subject: below --
2004-01-21 17:27 bmcdowell
2004-01-21 11:08 Exempt one IP from DNAT for the whole network alok.shukla
2004-01-21 12:19 ` netfiltering and ethernet bridging doesn't appear to work as advertised, help! Kirk Reiser
2004-01-21 13:20   ` Cedric Blancher
2004-01-21 13:36     ` Kirk Reiser
2004-01-21 13:51       ` Cedric Blancher

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.