netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* nft synproxy integration
@ 2015-11-09 16:30 Patrick McHardy
       [not found] ` <CAJO99T=4fjPkBTFEYuibGsHe=BfM0KRbhYkP_E_RPa49SUWeHg@mail.gmail.com>
  2015-11-09 19:36 ` Jozsef Kadlecsik
  0 siblings, 2 replies; 8+ messages in thread
From: Patrick McHardy @ 2015-11-09 16:30 UTC (permalink / raw)
  To: pablo; +Cc: netfilter-devel, bjornar.ness

We've talked about how to integrate synproxy in nft and agreed that it would
be preferrable to have a nicer way to use it.

The reason why the use is quite complicated right now is actually not because
of synproxy, but because of the desire to avoid creating conntracks for
spoofed connection requests. I don't see any way to avoid this, but we might
be able to make use a bit easier at some slightly higher cost. This applies
to both iptables and nft.

Basically the idea is:

* don't mark the first SYN untracked and have it create a conntrack as normal
* direct that SYN to synproxy
* mark the connection as proxied, which will avoid setting the ASSURED bit when
  receiving our spoofed reply
* only set assured once we have the connection fully established

This would create a conntrack, but keep it evictable under pressure. So the
cost would be ct set up, but we could tear it down at any point when we're
under pressure. The synproxy target can handle both connections with and
without a conntrack.

Usage would basically be:

nft filter input tcp dport 80 ct state INVALID,SYNPROXY synproxy ...

The ct state rule could actually be created automatically since it is a
dependency.

Iff we evict a connection before it is fully established, the final ACK will
be INVALID as it is now with untracked. This makes use less complex since a
single rule with suffice, but at the cost of potentially unnecessarily creating
conntracks. The method of using notrack would of course still be possible.

Any thoughts about this?

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: nft synproxy integration
@ 2016-07-19 22:30 Alexander Meinhardt
  0 siblings, 0 replies; 8+ messages in thread
From: Alexander Meinhardt @ 2016-07-19 22:30 UTC (permalink / raw)
  To: netfilter-devel

Any news about that?

Kind regards
Alex

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-07-19 22:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-09 16:30 nft synproxy integration Patrick McHardy
     [not found] ` <CAJO99T=4fjPkBTFEYuibGsHe=BfM0KRbhYkP_E_RPa49SUWeHg@mail.gmail.com>
2015-11-09 17:25   ` Fwd: " Bjørnar Ness
2015-11-09 17:35     ` Patrick McHardy
2015-11-09 19:36 ` Jozsef Kadlecsik
2015-11-09 20:13   ` Patrick McHardy
2015-11-09 22:29     ` Florian Westphal
2015-11-10  2:05       ` Patrick McHardy
  -- strict thread matches above, loose matches on Subject: below --
2016-07-19 22:30 Alexander Meinhardt

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).