All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rick Kennell <kennell@ecn.purdue.edu>
To: netfilter-devel@lists.netfilter.org, netfilter@lists.netfilter.org
Subject: port-based filtering of ESP packets with in-kernel IPsec?
Date: 29 Jul 2003 23:44:57 -0500	[thread overview]
Message-ID: <1059540296.16545.305.camel@k7.localnet> (raw)

I asked about this last week in the general netfilter list, but it
appears that most folks are still using FreeS/WAN for IPsec.

I'm using the in-kernel IPsec and want to be able to filter ESP packets
based on protocol or port number.  These values are encapsulated in the
ESP payload and are unavailable to netfilter.  If I were using
FreeS/WAN, I could use standard netfilter techniques on the ipsec0
device.  With the in-kernel IPsec, there's no extra pseudo-device with
which to examine unencapsulated ESP packets.

It looks too me like netfilter sees the packet as ESP in all chains in
all tables.  (I'd be delighted to be corrected.)

Since ESP packets that reach the mangle INPUT chain are destined for a
local process, why not unencapsulate them just before that point?  It
might still be nice to have an indication that this was once an ESP
packet for filtering, but that could be done by setting a mark in the
mangle PREROUTING chain.

I realize that this would probably require some heavy lifting in the
network layer to accomplish this nesting of functionality.

Am I missing something obvious?

-- 
Rick Kennell <kennell@ecn.purdue.edu>
Purdue University School of Electrical and Computer Engineering



             reply	other threads:[~2003-07-30  4:44 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-30  4:44 Rick Kennell [this message]
2003-07-30 10:34 ` port-based filtering of ESP packets with in-kernel IPsec? Chris Wilson
2003-07-30 15:42   ` Rick Kennell
2003-07-30 15:42   ` Rick Kennell
2003-07-30 19:10   ` Henrik Nordstrom
2003-07-30 19:10     ` Henrik Nordstrom
2003-07-30 14:24 ` Harald Welte
2003-07-30 14:51   ` Andreas Jellinghaus
2003-07-30 15:16     ` Harald Welte
2003-07-30 15:16     ` Harald Welte
2003-07-30 15:16     ` Harald Welte
2003-07-30 20:37     ` Dax Kelson
2003-07-30 22:51       ` Dax Kelson
2003-07-30 14:51   ` Andreas Jellinghaus
2003-07-30 14:51   ` Andreas Jellinghaus
2003-07-30 15:45 ` Jeremy Davis

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=1059540296.16545.305.camel@k7.localnet \
    --to=kennell@ecn.purdue.edu \
    --cc=netfilter-devel@lists.netfilter.org \
    --cc=netfilter@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.