File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / strongswan / testing / tests / route-based / net2net-xfrmi-netns / description.txt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Wed Jun 3 09:46:46 2020 UTC (4 years, 2 months ago) by misho
Branches: strongswan, MAIN
CVS tags: v5_9_2p0, v5_8_4p7, HEAD
Strongswan

This scenario demonstrates a property of <b>XFRM interfaces</b> that allows
moving them into network namespaces while retaining access to IPsec SAs and
policies in the original namespace. This enables an IKE daemon in one namespace
to provide IPsec tunnels for processes in other namespaces without having to
give them access to the keys and IKE credentials.
<p/>
The gateways use <b>route-based forwarding</b> with <b>XFRM interfaces</b>, with
firewall rules to allow traffic to pass. The IPsec traffic selector used is
0.0.0.0/0, however, specific routing is achieved with routes on the XFRM
interfaces.  The IKE daemon does not install routes for CHILD_SAs with outbound
interface ID, so static routes are installed for the target subnets.
<p/>
The XFRM interface on gateway <b>moon</b> is moved into a new network namespace
from which a ping is sent to client <b>bob</b>. It is then moved back out and
<b>alice</b> sends another ping to <b>bob</b> to test if that works too.
<p/>
Gateway <b>sun</b> dynamically creates the XFRM interface via updown script
using the passed unique generated interface ID.
<p/>
Note that the dropped packet seen on the <b>XFRM interface</b> on <b>moon</b>
is an IPv6 Router Solicitation (NDP) sent from that namespace, which doesn't
match the IPsec policy.

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>