From: "Timo Teräs" <timo.teras@iki.fi>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: David Miller <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: [PATCH] af_key: parse and send SADB_X_EXT_NAT_T_OA extension
Date: Thu, 22 Jan 2009 11:24:41 +0200 [thread overview]
Message-ID: <49783B59.90208@iki.fi> (raw)
In-Reply-To: <20090122085053.GA12806@gondor.apana.org.au>
Herbert Xu wrote:
> On Thu, Jan 22, 2009 at 10:31:32AM +0200, Timo Teräs wrote:
>> The (quickish) look on *swans would imply that for each
>> dynamic connection I would need to hand create a new connection
>> entity. Could be scriptable, but then I would somehow
>> need to make up connection names based on the IPs and always
>> inject full config by the admin tool.
>
> They have templates for inbound connections on servers and also
> outbound connections which were used for Opportunistic Encryption.
> So you can adapt these to generate connections on demand.
>
> Also creating/destroying connections at run-time is really easy
> without generating a full config at all by using ipsec whack.
I think I looked into openswan int he beginning in detail
and it had various problems. I think there wasn't netlink
stuff there either when I looked into it.
Looking at strongswan now, it does look a lot more usable.
But I don't like how IKEv2 is complitely separate from
IKEv1. Different daemons, different whack interface, etc.
There was some other things too why I decided to go for
ipsec-tools in the beginning. But it doesn't really matter
as long as I get IPsec.
So for the time being, I can have my patched kernel, fix
some of the swans and switch to it, or even write my own
IPsec keying manager if it comes to that. IPsec KM is not
that relevant for me, as long as it works.
>> But if there's multiple nodes behind same public IP the xfrm
>> has two (or more) choices for which xfrm state to use. The
>> NAT-OA can be used as distinguishing factor. So when ip_gre
>> sends out packet, the xfrm can choose the correct xfrm state.
>
> That's precisely what you don't want to do unless you trust all
> your peers equally. The reason is that NAT-OA is not authenticated,
> i.e., I can choose any address to send over as NAT-OA and there
> is nothing you can do to stop me.
>
> It was only ever intended to be used for fixing up the checksum
> so you can't safely use it for making policy/routing decisions.
In DMVPN/GRE case, the NAT-OA from IPsec would not be used
unless the NAT-OA is set on neighbour cache. This would not
happen unless NHRP can authenticate it. In DMVPN case you need
a valid certificate to give the ranom NAT-OA in any case. So
if you lie about your NAT-OA I can just revoke you.
Or do you have, other recommendations how to distinguish peers
behind same public IP than NAT-OA? Maybe we add the certificate
subject to xfrm state and neighbour cache. And use that?
That would certainly be authenticated. Would that be a better
approach? Or in general, allow a random token to be associated
with an xfrm state, so that we can connect neighbor cache in
gre interface to that specific state.
- Timo
next prev parent reply other threads:[~2009-01-22 9:24 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-21 7:34 [PATCH] af_key: parse and send SADB_X_EXT_NAT_T_OA extension Timo Teras
2009-01-21 22:33 ` Herbert Xu
2009-01-21 22:40 ` David Miller
2009-01-22 5:56 ` Timo Teräs
2009-01-22 6:03 ` David Miller
2009-01-22 6:14 ` Timo Teräs
2009-01-22 6:21 ` David Miller
2009-01-22 6:32 ` Herbert Xu
2009-01-22 6:39 ` Timo Teräs
2009-01-22 6:47 ` Herbert Xu
2009-01-22 6:54 ` Timo Teräs
2009-01-22 7:39 ` Herbert Xu
2009-01-22 8:31 ` Timo Teräs
2009-01-22 8:50 ` Herbert Xu
2009-01-22 9:24 ` Timo Teräs [this message]
2009-01-22 9:41 ` Herbert Xu
2009-01-22 10:00 ` Timo Teräs
2009-01-22 10:10 ` Herbert Xu
2009-01-23 6:18 ` Timo Teräs
2009-01-23 9:09 ` Herbert Xu
2009-01-22 6:22 ` Herbert Xu
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=49783B59.90208@iki.fi \
--to=timo.teras@iki.fi \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=netdev@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).