From: Nicolas Bareil <nico@chdir.org>
To: Jan Engelhardt <jengelh@medozas.de>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: scrubbing support in Netfilter
Date: Wed, 28 May 2008 09:20:39 +0200 [thread overview]
Message-ID: <87hccinbco.fsf@chdir.org> (raw)
In-Reply-To: alpine.LNX.1.10.0805271729350.12937@fbirervta.pbzchgretzou.qr
Hello Jan,
Thanks for your review!
Jan Engelhardt <jengelh@medozas.de> writes:
> I seem to remember that Linux's TCP or nf_conntrack already does
> some scrubbing.
That's right, that's the reason why it's not that hard to compete with
the OpenBSD features. The hard work is already done : fragmentation, tcp
sequence management, packet in the tcp window, sanity checks for invalid
constructed packets.
>> - Random IP ID
>> - Zeroify ToS
>
> Zeroify? Clearing the TOS is probably not a good idea because
> it defeats packet scheduling (if it uses TOS).
Correct me if I'm wrong, but on Internet (I mean, just after the first
ISP's router), the ToS is not used or even looked up.
I tried to make the scrubbing modular : you can choose to scrub a field
or not. I'm open to discuss the default flags for --scrub-everything
>> - TTL normalization
>>
>>* TCP
>> - Random TCP Sequence
>
> I wonder if Linux already has this.
Don't think so, AFAIK, Linux only randomizes the TCP sequence for its own
packet (in OUTPUT), not for the packet in transit.
>> - TCP Options
>> - Random Timestamp
>
> Is this even RFC compatible?
Yes I guess : I'm doing like for the TCP sequence stuff, when a
conntrack is created, I randomize the timestamp, compute the difference
(a substraction) between the original timestamp and mine that I store in
the conntrack.
Then, when I receive a packet, I apply the offset to reflect the change :
the meaning is intact because we are not putting a random value at each
packet.
> I suggest you have a look at "Writing your own Netfilter modules"
> (abbreviated NFM in this reply) document from
> http://jengelh.medozas.de/ , since I have seen a few outdated
> constructs in your code.
Ok, I noted your remarks and will submit tomorrow a new patch based on
the feedbacks!
--
Nicolas Bareil http://chdir.org/~nico/
OpenPGP=0xAE4F7057 Fingerprint=34DB22091049FB2F33E6B71580F314DAAE4F7057
next prev parent reply other threads:[~2008-05-28 7:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-27 15:12 scrubbing support in Netfilter Nicolas Bareil
2008-05-27 16:33 ` Jan Engelhardt
2008-05-28 4:38 ` Patrick McHardy
2008-05-28 7:33 ` Nicolas Bareil
2008-05-28 7:20 ` Nicolas Bareil [this message]
2008-05-28 7:27 ` Jan Engelhardt
-- strict thread matches above, loose matches on Subject: below --
2008-05-27 15:11 Nicolas Bareil
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=87hccinbco.fsf@chdir.org \
--to=nico@chdir.org \
--cc=jengelh@medozas.de \
--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 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.