All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Matthew Grant <grantma@anathoth.gen.nz>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: [PATCH]  - ipsecrx match - was Re: Writing iptables	IPSEC	reception support.
Date: Mon, 05 Apr 2004 03:27:16 +0200	[thread overview]
Message-ID: <4070B5F4.7010903@trash.net> (raw)
In-Reply-To: <1080861835.3750.17.camel@knox.wgtn.cat-it.co.nz>

Matthew Grant wrote:
> Patrick,
> 
> Isn't there room for both ways of doing it?

I don't think we need this match. The policy match offers a more
generic way for matching if a packet came from a tunnel. It works
in input and output, in tunnel and transport mode. This match only
supports input side in tunnel mode, and it needs to touch other
code.

> I have read the Web CVS for the policy match and you have only checked
> in IPv4.

Right, but it the only IPv4-specific thing it does is comparing the
tunnel endpoints.

> There is a security hole with the way iptables has to be set up to allow
> traffic in off the 2.6 IPSEC that allows packet injection off the
> immediate external ethernet.
> 
> The solution I have got is simple, and it also supports IPv6, and it
> closes the above hole by matching decapsulated traffic off the IPSEC
> tunnel.  We have a VPN network at work that we need to convert to racoon
> and the new IPSEC stack, and this problem needs to be sorted because of
> security auditing reasons.
> 
> The question is, how soon can you get the policy match in the mainline
> netfilter releases?  How well is it working? Do you support IPv6 yet? On
> reading the code it looks simple, so it should be easy to get right.  I
> could if you want get the thing finished if that is the preferred way to
> get things done.

Personal use and reports indicate it's working fine. It doesn't touch
other code, so it can't break anything. More testing is of course
welcome.

> Could you please let me know how you are placed.  A good solution is put
> the fix I have in now, and then add yours when it is ready.  They both
> do not stomp on each others toes, and can coexist together.

I guess I'll add an IPv6 counterpart, but I can't tell you when it's
going to get submitted. I don't think we should add your patch until
then for these reasons:

1. we have a working solution available as patch
2. we don't want to put it in and rip it out again after a short time
3. it's clearly no permanent solution.

Regards
Patrick

> 
> Thank you very much for your time and help.
> 
> Regards,
> 
> Matthew Grant
> 
> PS: I am also the Debian Maintainer for ipsec-tools and racoon packages.
> 
> On Fri, 2004-04-02 at 00:14, Patrick McHardy wrote:
> 
>>Matthew Grant wrote:
>>
>>>Patrick,
>>>
>>>Have written new patches.  Basically they just mark packets that came
>>>from IPSEC by setting a bit in the nfcache field in the skbuff. 
>>>Inspired by the longstanding nfmark feature.  Had to write quickly as I
>>>need a solution to this problem for security reasons.  Far simpler than
>>>the secpath stuff you wrote.
>>>
>>>I have attached the patches.  Not ready for patch-o-matic yet, but what
>>>do you think?
>>
>>I think we need more flexibility than this. The policy match allows you
>>to match --pol ipsec/none, but both ways.
>>
>>Regards
>>Patrick
>>
>>
>>>Cheers,
>>>
>>>Matthew Grant
>>
> 

      reply	other threads:[~2004-04-05  1:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1080772179.5070.9.camel@knox.wgtn.cat-it.co.nz>
     [not found] ` <20040401004343.GS1616@sunbeam.de.gnumonks.org>
     [not found]   ` <406B73E1.6020504@trash.net>
2004-04-01  4:36     ` [PATCH] - ipsecrx match - was Re: Writing iptables IPSEC reception support Matthew Grant
     [not found]     ` <1080793472.1768.14.camel@knox.wgtn.cat-it.co.nz>
     [not found]       ` <406C07B7.90601@trash.net>
2004-04-01 23:23         ` Matthew Grant
2004-04-05  1:27           ` Patrick McHardy [this message]

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=4070B5F4.7010903@trash.net \
    --to=kaber@trash.net \
    --cc=grantma@anathoth.gen.nz \
    --cc=netfilter-devel@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.