All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michel Banguerski <Michel.Banguerski@laposte.net>
To: netfilter-devel@lists.samba.org
Subject: Re: Syncookie firewall
Date: Fri, 07 Jun 2002 11:21:40 +0200	[thread overview]
Message-ID: <3D007B24.9010804@laposte.net> (raw)
In-Reply-To: 200206061932.04510.hno@marasystems.com

Henrik Nordstrom wrote:
[...]

>What worries me is
>
>  * Window scaling
>  * Timestamp
>  * ECN
>
>and a number of other end-to-end TCP options that depend on correct 
>negotiation during SYN.
>
>Sure, window scaling and ECN can be set by configuration if You know Your 
>server, but there is no good way to deal with the timestamp option short of 
>forcibly filter it out entirely from the TCP stream
>

I agree that this is far from being trivial. And in fact, I'm almost interested inprotecting servers  known to me. That's why it seems mandatory to me to use a mach/target approach that allows one to define a fine graned policy about 
SynCooking, but this approach also allows to  implement a fallback policy: if
You don't know how to handle a particular TCP option, You pass the connection to 
the transparent proxying daemon (then You will need to stick with it, but CONNMARK 
will do the job ;o).

Thus hardconding tcp options in the ruleset seems aceptable to me.
 
Additionally it may be possible to have some autolearning behaviour 
using an
approach similar to "recent" match module: You start with no SynCookies, 
but
when You see a SYN-ACK packet from an inside machine You  add it to a 
list of
hosts with known TCP capabilities. The drawback of this approach is when You
have NAT inside Your own network: the same inside address seen by Your FW
may show different behaviours depending on who is behind, once agan, for now
I cant see other solutions than to hardcode in Your rulset the fact that we
dont want learn about this address.

In fact we can combine fallback/autolearn approaches: The daemon that 
 relays
connections unhandled by SynCookie, can BTW track servers capabilities and
install appropriate rules, this would avoid the complexity of automodifying
ruleset.


The timestamp case: I must confess, I'm not sure to fully understand how it
works, but it seems to me that the important decision to take at SYN packet
reception is to agree ot not on timestamping. Would it be really 
harmfull if
the first timestamp is not accurate (if You answer to the timestamp from 
the
firewall the RTT value calculated by the peer will be shortened be the RTT
inside your private net with is commonly short) ? If we can accept that, 
then
let's just do like for other options: setup rules where you accept 
timestamp
for particular hosts and reject for the rest.

Well, all this works if you protect your inside network from outside 
attacks,
but protecting outside from inside is way more difficult because you can't
gather and keep information about all servers that your users will 
potentially
connect to. But precisely because you better control on inside, may be 
outgoing
SynCookies are not such important: because it's easier to avoid 
spooffing on
your corporate network, throttling outgoing SYNs may be suffisent...


What are other TCP options that You think of ?

Regards
Michel


BTW: I'm not 100% sure but it seems to me that at least inversion 4.1
Checkpoint FW1 was rejecting by default packets with *ANY* TCP
option , and people were "happy" with that  :-)
(of course vendors lasyness is ont a good reason for doing bad design)

  reply	other threads:[~2002-06-07  9:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20020606020322.05BF64258@lists.samba.org>
2002-06-06 16:28 ` Syncookie firewall Don Cohen
2002-06-06 17:32   ` Henrik Nordstrom
2002-06-07  9:21     ` Michel Banguerski [this message]
2002-06-07  9:47       ` Michel Banguerski
2002-06-07  9:56       ` Henrik Nordstrom
     [not found] <20020606192927.6B7684DCE@lists.samba.org>
2002-06-06 21:18 ` Don Cohen
2002-06-06 21:34   ` Henrik Nordstrom
2002-06-06 22:03     ` Mark Atwood
2002-06-06 22:36     ` Don Cohen
     [not found] <20020603132204.7934546FF@lists.samba.org>
2002-06-05 19:30 ` Don Cohen
2002-06-05 19:38   ` Henrik Nordstrom
2002-06-02 18:47 Michel Banguerski

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=3D007B24.9010804@laposte.net \
    --to=michel.banguerski@laposte.net \
    --cc=netfilter-devel@lists.samba.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.