From: Massimiliano Hofer <max@nucleus.it>
To: netfilter-devel@lists.netfilter.org
Cc: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Subject: Re: new ABI
Date: Tue, 5 Sep 2006 00:26:20 +0200 [thread overview]
Message-ID: <200609050026.21018.max@nucleus.it> (raw)
In-Reply-To: <Pine.LNX.4.58.0608241122500.8098@blackhole.kfki.hu>
On Thursday 24 August 2006 12:15 pm, Jozsef Kadlecsik wrote:
> I think the current system is pushed to its limits and it is time for
> radical changes. Non-radical change proposals can of course explore the
> current problems and point to directions toward the proper solutions, so
> such efforts are not wasted.
I've been thinking of a few things we can do in an incremental way, but the
reality is that the most important features require a drastically different
interaction with userspace and one of the primary goals is to reduce the
number of user space visible changes. This does not apply to development
versions of course. There are lots of small incremental steps we can do
in "developer mode".
> > > > + Allow grouping of rules in some way. Really large firewall needs
> > > > this.
> > >
> > > Sub-tables can probably help. It seems to me non-trivial how not to
> > > loose efficiency, though. Multiple toplevel tables (i.e active/passive,
> > > active/backup) should also be considered.
> >
> > Is this the same thing I'm calling expression chains? We could have an
> > expression table with user defined chains that system chains can use.
> > I don't think it would be inefficient. Just jump to a chain and see what
> > it returns. If we want to optimize it we could cache results so that
> > people can use sub-chains several times (in different combinations)
> > withou worrying about it.
>
> Could you show an example?
iptables -t macro -N trustedclient
iptables -t macro -A trustedclient ... -j TRUE
...
iptables -t macro -A trustedclient ... -j FALSE
iptables -t macro -N trustedserver
...
iptables -I FORWARD --macro trustedclient --macro trustedserver -j ACCEPT
Of course, the real usefulness comes when you use multiple combinations.
Another user could be to have a single macro in FORWARD and in nat
POSTROUTING. This poses the problem of what matches to allow in macro chains.
The maximum common set? Ignore non applicable ones? Separate macros for every
context?
We could cache the result of a macro the first time we run into it (for a
single packet) and avoid traversing the chain when we reuse it.
I have lots of firewalls where I use a script to generate combinations of
rules. This feature would simplify all of them.
> Sub-tables as I name are complete tables of the given type (filter,
> mangle, etc):
>
> # Define new, empty filter type of table foo:
> -t filter --new-table foo
> # Fill it up with rules, define default policies, etc
> -t foo -A ...
> ...
>
> # Then you could chain filter type of tables one after another
> # using the default as an always existing one:
> -t filter --prepend-table foo
> -t filter --append-table bar
> # Now we'd have foo, default, bar as filter tables to be evaluated
Similar goal, different style.
Why not just:
-t filter --evaluate-table foo
This way you could mix it with other rules and allow for more flexible mixing
of more than 2 sub-tables.
Would you forbid {prepend|append|evalute}-table in sub-tables in order to
avoid infinite recursion or would you check for cyclicity at load time or run
time?
> > What level of runtime synchronization do you need? We have to allow some
> > delay between 2 firewalls.
>
> It depends on the active-active setup and the modules in question. If the
> TCP/UDP/etc. streams can pass any of the firewalls then strong
> syncronization is required. If the streams always pass the same firewall
> in both directions (except after failover), then loose syncronization
> can be enough. recent/set modules probably always require strong sync.
This is feasible only with ip_conntrack_tcp_be_liberal. I don't think you will
ever keep a completerly up to date mirror state down to the last sequence
number unless you use some special and really fast means of communication.
Synchronous remote communication in the middle of packet processing is out of
the question.
Do you have a something specific in your mind?
If you settle for loose synchronization we can certainly have a way to send
kernel generated change events to userspace and then you could send them to
the other members of the cluster.
> > If we implement generic module data tables (with event notification to
> > userspace), this wouldn't be a kernel problem anymore.
>
> Yes, we just need such an infrastructure to back the module writers.
This is one of the few things we could add without breaking backward
compatibility.
--
Saluti,
Massimiliano Hofer
Nucleus
prev parent reply other threads:[~2006-09-04 22:26 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-14 21:12 new ABI Massimiliano Hofer
2006-08-15 0:00 ` Joakim Axelsson
2006-08-15 8:39 ` Amin Azez
2006-08-15 22:08 ` Massimiliano Hofer
2006-08-15 12:14 ` Simon Lodal
2006-08-15 22:57 ` Massimiliano Hofer
2006-08-18 14:14 ` Simon Lodal
2006-08-18 21:40 ` Massimiliano Hofer
2006-08-18 14:50 ` Amin Azez
2006-08-23 18:06 ` Sven Anders
2006-08-23 21:19 ` Massimiliano Hofer
2006-08-24 7:57 ` Sven Anders
2006-08-16 12:16 ` Joakim Axelsson
2006-08-16 12:29 ` Joakim Axelsson
2006-08-16 14:40 ` Joakim Axelsson
2006-08-18 13:06 ` Simon Lodal
2006-08-18 21:40 ` Massimiliano Hofer
2006-08-18 22:24 ` Massimiliano Hofer
2006-08-22 8:46 ` Jozsef Kadlecsik
2006-08-23 5:01 ` Patrick McHardy
2006-08-23 13:48 ` Joakim Axelsson
2006-08-24 9:20 ` Jozsef Kadlecsik
2006-08-24 13:48 ` Joakim Axelsson
2006-08-24 8:50 ` Jozsef Kadlecsik
2006-08-24 10:58 ` Massimiliano Hofer
2006-08-24 11:22 ` Jozsef Kadlecsik
2006-08-24 13:13 ` Massimiliano Hofer
2006-08-24 16:47 ` Patrick McHardy
2006-08-23 21:13 ` Massimiliano Hofer
2006-08-24 10:15 ` Jozsef Kadlecsik
2006-09-04 22:26 ` Massimiliano Hofer [this message]
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=200609050026.21018.max@nucleus.it \
--to=max@nucleus.it \
--cc=kadlec@blackhole.kfki.hu \
--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.