All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Cc: Netfilter Development Mailinglist
	<netfilter-devel@lists.netfilter.org>,
	Martijn Lievaart <m@rtij.nl>
Subject: Re: [Proposal] ip_conntrack_tuple extension for advanced matching
Date: Tue, 26 Sep 2006 01:48:19 +0200	[thread overview]
Message-ID: <45186AC3.6080505@netfilter.org> (raw)
In-Reply-To: <45184198.1060906@gmx.net>

Carl-Daniel Hailfinger wrote:
> 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?

IHMO, your numering schema is not convenient. I would not accept such
patch since I can't see any other utility apart from supporting your
setting.

-- 
The dawn of the fourth age of Linux firewalling is coming; a time of
great struggle and heroic deeds -- J.Kadlecsik got inspired by J.Morris

  reply	other threads:[~2006-09-25 23:48 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           ` [Proposal] ip_conntrack_tuple extension for advanced matching Carl-Daniel Hailfinger
2006-09-25 23:48             ` Pablo Neira Ayuso [this message]
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=45186AC3.6080505@netfilter.org \
    --to=pablo@netfilter.org \
    --cc=c-d.hailfinger.devel.2006@gmx.net \
    --cc=m@rtij.nl \
    --cc=netfilter-devel@lists.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.