| 12345678910111213141516171819202122 | This scenario demonstrates a property of <b>XFRM interfaces</b> that allowsmoving them into network namespaces while retaining access to IPsec SAs andpolicies in the original namespace. This enables an IKE daemon in one namespaceto provide IPsec tunnels for processes in other namespaces without having togive them access to the keys and IKE credentials.<p/>The gateways use <b>route-based forwarding</b> with <b>XFRM interfaces</b>, withfirewall rules to allow traffic to pass. The IPsec traffic selector used is0.0.0.0/0, however, specific routing is achieved with routes on the XFRMinterfaces.  The IKE daemon does not install routes for CHILD_SAs with outboundinterface 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 namespacefrom 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 scriptusing 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'tmatch the IPsec policy.
 |