All of lore.kernel.org
 help / color / mirror / Atom feed
* conntrack: confirm existing but do not create new entries
@ 2021-08-18 15:53 Eugene Crosser
  2021-08-18 16:13 ` Florian Westphal
  0 siblings, 1 reply; 9+ messages in thread
From: Eugene Crosser @ 2021-08-18 15:53 UTC (permalink / raw)
  To: netfilter


[-- Attachment #1.1: Type: text/plain, Size: 1091 bytes --]

Hello,

My use case is to set up a stateful firewall allowing any outgoing connection
from a host, and restricting incoming, which obviously requires conntracking.
The twist is that there exists a rather high probability of DoS-like incoming
traffic, that easily overflows conntrack table with unconfirmed entries, even
though their lifetime is very short.

I was hoping to keep conntracking enabled in the outgoing/raw hook, but in the
prerouting/raw hook disable conntracking _unless_ an entry (previously created
by an outgoing packet) already exists. In other words, *make incoming packets
update existing entries but never create new entries*.

Looking at the code in resolve_normal_ct(), apparently there is no any special
flag or anything for that. But maybe it is possible to have a rule in the
prerouting/raw chain that would conditionally set `notrack` flag depending on a
lookup in the conntrack table?

Or maybe there are other suggestions how to achieve the goal (of not letting
"unexpected" incoming packets fill conntrack table)?

Thank you,

Eugene


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2021-08-23 13:57 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-18 15:53 conntrack: confirm existing but do not create new entries Eugene Crosser
2021-08-18 16:13 ` Florian Westphal
2021-08-18 16:20   ` Eugene Crosser
2021-08-19  7:44   ` Eugene Crosser
2021-08-19  9:09     ` Florian Westphal
2021-08-19 13:47       ` Eugene Crosser
2021-08-19 14:18         ` Florian Westphal
2021-08-23 13:31           ` Eugene Crosser
2021-08-23 13:57             ` Mathew Heard

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.