netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oskar Berggren <oskar.berggren@gmail.com>
To: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: ipset and interfaces
Date: Tue, 24 May 2011 14:23:05 +0200	[thread overview]
Message-ID: <BANLkTi=drvnwAiXk-Js+1Dw0wxWGNsT1xA@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1105241344200.1846@blackhole.kfki.hu>

2011/5/24 Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>:
> On Tue, 24 May 2011, Oskar Berggren wrote:
>
>> Regarding ipsets.... how crazy would it be to add a set type
>> containing interface names?
>
> Usually the number of interfaces are not quite high in a system, so it
> does not seem required.

I have machines with plenty of vlans. About 700 interfaces in the
largest instance currently.
That said, I don't have a clear use case for this particular set type
currently, but out of curiosity,
would it be reasonably doable within the ipset framework?


>
>> And how crazy would it be to add a set type containing tuples of
>> ip-address and interface name?  (I.e. the set match would look for ip,
>> and match if a tuple with the proper interface is found)
>
> What is the case where a combination of matches does not solve the issue?
> Something like this
>
> -N interfaces
> -A interfaces -i foo -j ACTION
> ...
>
> -A rule -m set --match-set src -j interfaces
>
> and thus you can match IP addresses and possible (incoming) interfaces
> easily.


As above, about 700 interfaces, each with a generally just a few
source ip-addresses
expected for each interface, or a few subnets. I.e. in the simplest
case a single ip is
acceptable for a single interface, for a total of a couple of hundred
interfaces. This
is similar to rp_filter, but I had trouble getting that to work
predictably with multiple
routing tables. Currently I've solved it with a tree structure of
iptables chains and rules,
but being able to use a single set for this would look so much nicer.

/Oskar
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2011-05-24 12:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-24 11:19 ipset and interfaces Oskar Berggren
2011-05-24 11:52 ` Jozsef Kadlecsik
2011-05-24 12:23   ` Oskar Berggren [this message]
2011-05-24 12:37     ` Jozsef Kadlecsik
2011-05-24 12:42       ` Anton VG
2011-05-24 12:43       ` Mr Dash Four

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='BANLkTi=drvnwAiXk-Js+1Dw0wxWGNsT1xA@mail.gmail.com' \
    --to=oskar.berggren@gmail.com \
    --cc=kadlec@blackhole.kfki.hu \
    --cc=netfilter-devel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).