From: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
To: Martijn Lievaart <m@rtij.nl>
Cc: Netfilter Development Mailinglist
<netfilter-devel@lists.netfilter.org>,
Pablo Neira Ayuso <pablo@netfilter.org>
Subject: [Proposal] ip_conntrack_tuple extension for advanced matching
Date: Mon, 25 Sep 2006 22:52:40 +0200 [thread overview]
Message-ID: <45184198.1060906@gmx.net> (raw)
In-Reply-To: <45182332.8090303@rtij.nl>
Martijn Lievaart wrote:
> Carl-Daniel Hailfinger wrote:
>
>> No, they are not. Let me explain:
>> The box in question has two pairs of interfaces.
>> eth0: 10.0.0.254/24 eth1: 10.0.1.254/24
>> eth2: 10.0.0.254/24 eth3: 10.0.1.254/24
>> I want to do routing and firewalling between eth0 and eth1. That's
>> simple. However, I also want to do routing and filtering between
>> eth2 and eth3. Although eth0 and eth2 have the same subnet, they
>> are NOT the same network, they just happen to have identical
>> configurations. Same goes for eth1 and eth3.
>
> OK, it's clear to me now. I don't think you can achieve that with
> current netfilter connection tracking.
Yes, that's why I wanted to change conntack to optionally consider
a fwmark/whatever value for matching connections.
>> /\/\/\/\/\/\/\/\ +------+ /\/\/\/\/\/\/\/\
>> \ / | | \ /
>> | 10.0.0.0/24 |---eth0 eth1---| 10.0.1.0/24 |
>> / \ | | / \
>> \/\/\/\/\/\/\/\/ +------+ \/\/\/\/\/\/\/\/
>>
>>
>> /\/\/\/\/\/\/\/\ +------+ /\/\/\/\/\/\/\/\
>> \ / | | \ /
>> | 10.0.0.0/24 |---eth2 eth3---| 10.0.1.0/24 |
>> / \ | | / \
>> \/\/\/\/\/\/\/\/ +------+ \/\/\/\/\/\/\/\/
>
> Why not do it exactly like that, but with two real boxes? Makes
> interconnecting later also a nobrainer (NETMAP).
The setup is already running with one box. It's just the firewalling
which has problems sometimes. I've even used NETMAP to make
connections between the networks of eth0 and eth2 possible on the
same machine.
The problems only happen if two connections with the same conntrack
tuple happen at the same time. A seldom occurence, I agree. But I
had it happen (IIRC there were two identical pings running in the
different network pairs). Now my goal is to make it perfect.
New proposal:
To handle interfaces in different networks with identical configuration,
connection tracking may optionally consider an additional "realm/mark"
value for matching connections. Such a value would be set for each
packet in the RAW table and have a default value of 0. For existing
setups, no change will happen. Both directions of a flow must have the
same "realm/mark" value set on incoming packets. Expectations also will
have the value set for any new expectation. Since reusing nfmark will
break some setups, struct sk_buff probably has to be enlarged.
Would a patch for adding such a feature be accepted into mainline?
Regards,
Carl-Daniel
next prev parent reply other threads:[~2006-09-25 20:52 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-22 20:33 ip_conntrack_tuple and marks Carl-Daniel Hailfinger
2006-09-24 3:14 ` Pablo Neira Ayuso
2006-09-24 17:57 ` Carl-Daniel Hailfinger
2006-09-24 22:03 ` Martijn Lievaart
2006-09-25 14:04 ` Carl-Daniel Hailfinger
2006-09-25 18:42 ` Martijn Lievaart
2006-09-25 20:52 ` Carl-Daniel Hailfinger [this message]
2006-09-25 23:48 ` [Proposal] ip_conntrack_tuple extension for advanced matching Pablo Neira Ayuso
2006-09-26 10:00 ` Patrick McHardy
2006-09-26 13:45 ` Martijn Lievaart
[not found] ` <60318.2001:888:19e1::53.1159278334.squirrel@dexter>
2006-09-26 13:54 ` Carl-Daniel Hailfinger
2006-09-26 13:59 ` Patrick McHardy
2006-09-26 14:45 ` Carl-Daniel Hailfinger
2006-09-25 21:56 ` ip_conntrack_tuple and marks Eric Leblond
2006-09-25 22:02 ` Carl-Daniel Hailfinger
2006-09-25 22:08 ` Eric Leblond
2006-09-25 22:23 ` Carl-Daniel Hailfinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45184198.1060906@gmx.net \
--to=c-d.hailfinger.devel.2006@gmx.net \
--cc=m@rtij.nl \
--cc=netfilter-devel@lists.netfilter.org \
--cc=pablo@netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.