the ikev2/nat-two-rw-mark and ikev2/rw-mark-in-out scenarios use the PLUTO_MARK_IN and PLUTO_ESP_ENC variables in the mark_update script

This commit is contained in:
Andreas Steffen
2010-07-17 16:32:47 +02:00
parent 16c97c8e59
commit d2d7ed9227
21 changed files with 1262 additions and 58 deletions
@@ -0,0 +1,16 @@
The roadwarriors <b>alice</b> and <b>venus</b> sitting behind the router <b>moon</b> set up
tunnels to gateway <b>sun</b>. Since both roadwarriors possess the same 10.1.0.0/25 subnet,
gateway <b>sun</b> uses Source NAT after ESP decryption to map these subnets to 10.3.0.10
and 10.3.0.20, respectively.
<p/>
In order to differentiate between the tunnels to <b>alice</b> and <b>venus</b>, respectively,
<b>XFRM marks</b> are defined for both the inbound and outbound IPsec SAs and policies using
the <b>mark_in</b> and <b>mark_out</b> parameters in ipsec.conf.
<p/>
<b>iptables -t mangle</b> rules are then used in the PREROUTING chain to mark the traffic to
and from <b>alice</b> and <b>venus</b>, respectively.
<p/>
The iptables script designated by <b>leftupdown=/etc/mark_updown</b> automatically inserts
inbound mangle rules that mark the inbound ESP packets as well as the IPsec-policy rules
that let pass the tunneled traffic. In order to test the tunnel, the hosts <b>alice</b>
and <b>venus</b> ping the client <b>bob</b> behind the gateway <b>sun</b>.