Networking Forums

Networking Forums > Computer Networking > Linux Networking > netfilter + iproute2 + bridge = incompatible?

Reply
Thread Tools Display Modes

netfilter + iproute2 + bridge = incompatible?

 
 
Tor I. Skaar
Guest
Posts: n/a

 
      08-03-2004, 09:34 AM
After extensive testing, I believe that the combination
netfilter-iproute2-bridge does not work. The following has been set up
on a machine:

- A transparent bridge between eth0 and eth1 (Bridge code patched, so
it act as a hub)

brctl addbr br0
brctl addif br0 eth0
brctl addif br0 eth1
brctl stp br0 off

- Marking certain sessions with netfilter

iptables -t mangle -A PREROUTING -m conntrack --ctorigsrc <address> -j
MARK --set-mark 1
iptables -t mangle -A PREROUTING -m mark --mark 1 -j LOG --log-prefix
"Mark: " #used only for testing

- ip2routing based on netfilter marks

ip rule add fwmark 1 table 2
ip route add 0/0 dev eth2 table 2

A simple drawing of the setup. Notice that the box is located off the
main wire.

External net |
------------ eth2
| +--+--+
TAP----eth0+ +eth1--
| +-----+
------------
Internal net

All interfaces are configured as follows:

ip addr add 0.0.0.0 dev {eth0, eth1, eth2, br0}
ip link set {eth0, eth1, eth2, br0} arp off up

The marking of packets works correctly (log as expected), but iproute2
does not perform routing.

Any suggestions to why this does not work?

-
BTW, using the netfilter route patch/module is not an option as this
removes state entries from /proc/net/ip_conntrack.

I recently found a similar case on this group:

http://groups.google.com/groups?hl=e...5bc.0407202219
..8daacc3%40posting.google.com&rnum=1&prev=/groups%3Fhl%3Den%26lr%3D%26ie%3DUTF
-8%26selm%3Dd10945bc.0407202219.8daacc3%2540posting .google.com
 
Reply With Quote
 
 
 
 
Morten Isaksen
Guest
Posts: n/a

 
      08-03-2004, 07:01 PM
On 3 Aug 2004 02:34:32 -0700, Tor I. Skaar wrote:


> ip rule add fwmark 1 table 2
> ip route add 0/0 dev eth2 table 2


> The marking of packets works correctly (log as expected), but iproute2
> does not perform routing.


> Any suggestions to why this does not work?


I dont know if it makes a difference but I use this syntax:

ip rule add fwmark 1 table 100 pref 1000
ip route add table 200 scope global nexthop dev eth2

--
Morten Isaksen
http://www.aub.dk/~misak/
 
Reply With Quote
 
Tor I. Skaar
Guest
Posts: n/a

 
      08-04-2004, 09:10 AM
Morten Isaksen <(E-Mail Removed)> wrote in message news:<15904q5m0c2kn$.z742sb1s38s9$.(E-Mail Removed)> ...
> On 3 Aug 2004 02:34:32 -0700, Tor I. Skaar wrote:
>
>
> > ip rule add fwmark 1 table 2
> > ip route add 0/0 dev eth2 table 2

>
> > The marking of packets works correctly (log as expected), but iproute2
> > does not perform routing.

>
> > Any suggestions to why this does not work?

>
> I dont know if it makes a difference but I use this syntax:
>
> ip rule add fwmark 1 table 100 pref 1000
> ip route add table 200 scope global nexthop dev eth2


It shouldn't make any difference, as the order of the selector (e.g.
fwmark) and action (e.g. table) doesn't matter. And the extra
parameters you use is optional.

The thing is that I have gotten exactly this configuration to work in
a static network setup, but without the bridge (bridge + hub patch).

It's really puzzling, as my iproute2 rules are very simple.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
MN-500 incompatible with DSL modem? Newbie Broadband Hardware 1 11-04-2006 11:11 PM
incompatible product Den Broadband 3 08-24-2006 06:58 PM
Is MN-520 incompatible with Wireless Zero? =?Utf-8?B?cmJ1cmwxMjM=?= Broadband Hardware 0 06-22-2005 05:51 PM
openmosix_2.6 incompatible tux Linux Networking 0 04-12-2005 12:25 PM
Windows ME &XP incompatible networking? Kim Windows Networking 1 08-30-2003 07:10 AM



1 2 3 4 5 6 7 8 9 10 11