]> git.ipfire.org Git - people/ms/network.git/commit
IPsec: Fix routing
authorJonatan Schlag <jonatan.schlag@ipfire.org>
Thu, 1 Mar 2018 15:15:38 +0000 (15:15 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 1 Mar 2018 21:06:42 +0000 (21:06 +0000)
commit048afd0747a14e4188d9617741962bfb38773f5b
tree06ddb4ecaacf752adda5c20d15162a8eb0ab1881
parent93a9eeb0e4a6db467f301a87e1430c8d3f581998
IPsec: Fix routing

Based on the examples found in strongswan
we need to specific the source IP for our routes through an IPsec VPN.
If we have no source IP (a router can route packages
which do not belong to the network assigned to our zones) we set no routes,
but clients can still use the tunnel.

For IPsec VPNs in tunnel mode we
also need the device which has the ${PLUTO_ME} IP address asigned.

The source IP  is determined ip_get_assigned_addresses_from_net()
the device is determined by the  device_get_by_ip_address() function.

For tunnel mode see:
https://www.strongswan.org/testing/testresults/ipv6-stroke/net2net-ip4-in-ip6-ikev2/moon.ip.route

Fixes: #11629
Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/helpers/ipsec-updown