Hi All,<br><br>I'm having a problem when trying to upgrade from FreeS/WAN 1.99 to Openswan 2.6.18 (klips).<br><br>The setup is a hub and spoke VPN where two spoke sites (B and C) are connecting into the hub site (A). The protected subnets are all different (i.e. this is not an 'extruded subnet' setup) and eroutes are used to route from B to C and vice versa.<br>
<br>On each of the spokes, an additional eroute is added with the local subnet as the source and the other spokes subnet as the destination and the hub as the gateway.<br><br>On the hub, two eroutes are added, each having one spoke as the source and the other spoke as the destination.<br>
<br>This works fine when using Freeswan, but when using Openswan for the hub, the Hub does not even accept the incoming traffic from the spoke, i.e. if I do a tcpdump on ipsec0 I do not see the incoming traffic. <br><br>I'm including the configuration for the two setups, as well as some ping and tcpdump output, note that they have
different IP addresses (I set up two setups to be able to run the tests
at the same time). For both setups, the WAN addresses are on the
192.168.1.x network and the LAN addresses are on different 172.16.x.x
subnets. Also note that in the Openswan setup, only the hub is using
Openswan, the two spokes are still Freeswan.<br><br>How do I make this work in Openswan?<br><br>Thanks / Mattias<br><br><br><br>-------------------------------------------------------------------------------------------------------------------------------------<br>
For the Freeswan setup, the IP addresses are as follows:<br>Hub - 172.16.10.110 - 192.168.1.10<br>Spoke1 - 172.16.30.130 - 192.168.1.30<br>Spoke2 - 172.16.60.160 - 192.168.1.60<br><br>Hub's ipsec.conf<br>
-----------------------<br>config setup<br> interfaces = "ipsec0=eth1"<br> klipsdebug = none<br> plutodebug = none<br> plutoload = %search<br> plutostart = %search<br> uniqueids = yes<br>
hidetos = no<br>conn t10to30<br> type = tunnel<br> left = 192.168.1.10<br> right = 192.168.1.30<br> leftnexthop = 192.168.1.1<br> leftsubnet = <a href="http://172.16.10.0/24">172.16.10.0/24</a><br>
rightsubnet = <a href="http://172.16.30.0/24">172.16.30.0/24</a><br> auto = start<br> keyexchange = ike<br> authby = secret<br> auth = esp<br> keyingtries = 0<br> esp = AES128-SHA1<br>
pfs = yes<br> rekey = yes<br> leftid = 192.168.1.10<br> rightid = 192.168.1.30<br> ike = 3DES-SHA-MODP1024<br> ikelifetime = 28800s<br> keylife = 86400s<br> rekeymargin = 10m<br>
rekeyfuzz = 20%<br>conn t10to60<br> type = tunnel<br> left = 192.168.1.10<br> right = 192.168.1.60<br> leftnexthop = 192.168.1.1<br> leftsubnet = <a href="http://172.16.10.0/24">172.16.10.0/24</a><br>
rightsubnet = <a href="http://172.16.60.0/24">172.16.60.0/24</a><br> auto = start<br> keyexchange = ike<br> authby = secret<br> auth = esp<br> keyingtries = 0<br> esp = AES128-SHA1<br>
pfs = yes<br> rekey = yes<br> leftid = 192.168.1.10<br> rightid = 192.168.1.60<br> ike = 3DES-SHA-MODP1024<br> ikelifetime = 28800s<br> keylife = 86400s<br> rekeymargin = 10m<br>
rekeyfuzz = 20%<br><br>Hub's eroutes<br>
-----------------------<br>0 <a href="http://172.16.10.0/24">172.16.10.0/24</a> -> <a href="http://172.16.30.0/24">172.16.30.0/24</a> => <a href="mailto:tun0x101b@192.168.1.30">tun0x101b@192.168.1.30</a><br>
0 <a href="http://172.16.10.0/24">172.16.10.0/24</a> -> <a href="http://172.16.60.0/24">172.16.60.0/24</a> => <a href="mailto:tun0x101f@192.168.1.60">tun0x101f@192.168.1.60</a><br>26 <a href="http://172.16.30.0/24">172.16.30.0/24</a> -> <a href="http://172.16.60.0/24">172.16.60.0/24</a> => <a href="mailto:tun0x101f@192.168.1.60">tun0x101f@192.168.1.60</a><br>
26 <a href="http://172.16.60.0/24">172.16.60.0/24</a> -> <a href="http://172.16.30.0/24">172.16.30.0/24</a> => <a href="mailto:tun0x101b@192.168.1.30">tun0x101b@192.168.1.30</a><br><br>Spoke1's ipsec.conf<br>
-----------------------<br>config setup<br> interfaces = "ipsec0=eth1"<br> klipsdebug = none<br> plutodebug = none<br> plutoload = %search<br> plutostart = %search<br> uniqueids = yes<br>
hidetos = no<br>conn t30to10<br> type = tunnel<br> left = 192.168.1.30<br> right = 192.168.1.10<br> leftnexthop = 192.168.1.1<br> leftsubnet = <a href="http://172.16.30.0/24">172.16.30.0/24</a><br>
rightsubnet = <a href="http://172.16.10.0/24">172.16.10.0/24</a><br> auto = start<br> keyexchange = ike<br> authby = secret<br> auth = esp<br> keyingtries = 0<br> esp = AES128-SHA1<br>
pfs = yes<br> rekey = yes<br> leftid = 192.168.1.30<br> rightid = 192.168.1.10<br> ike = 3DES-SHA-MODP1024<br> ikelifetime = 28800s<br> keylife = 86400s<br> rekeymargin = 10m<br>
rekeyfuzz = 20%<br><br>Spoke1's eroutes<br>
-----------------------<br>0 <a href="http://172.16.30.0/24">172.16.30.0/24</a> -> <a href="http://172.16.10.0/24">172.16.10.0/24</a> => <a href="mailto:tun0x1004@192.168.1.10">tun0x1004@192.168.1.10</a><br>
26 <a href="http://172.16.30.0/24">172.16.30.0/24</a> -> <a href="http://172.16.60.0/24">172.16.60.0/24</a> => <a href="mailto:tun0x1004@192.168.1.10">tun0x1004@192.168.1.10</a><br><br><br>Spoke2's ipsec.conf<br>
-----------------------<br>config setup<br> interfaces = "ipsec0=eth1"<br> klipsdebug = none<br> plutodebug = none<br> plutoload = %search<br> plutostart = %search<br> uniqueids = yes<br>
hidetos = no<br>conn t60to10<br> type = tunnel<br> left = 192.168.1.60<br> right = 192.168.1.10<br> leftnexthop = 192.168.1.1<br> leftsubnet = <a href="http://172.16.60.0/24">172.16.60.0/24</a><br>
rightsubnet = <a href="http://172.16.10.0/24">172.16.10.0/24</a><br> auto = start<br> keyexchange = ike<br> authby = secret<br> auth = esp<br> keyingtries = 0<br> esp = AES128-SHA1<br>
pfs = yes<br> rekey = yes<br> leftid = 192.168.1.60<br> rightid = 192.168.1.10<br> ike = 3DES-SHA-MODP1024<br> ikelifetime = 28800s<br> keylife = 86400s<br> rekeymargin = 10m<br>
rekeyfuzz = 20%<br><br>Spoke2's eroutes<br>
-----------------------<br>0 <a href="http://172.16.60.0/24">172.16.60.0/24</a> -> <a href="http://172.16.10.0/24">172.16.10.0/24</a> => <a href="mailto:tun0x1004@192.168.1.10">tun0x1004@192.168.1.10</a><br>
62 <a href="http://172.16.60.0/24">172.16.60.0/24</a> -> <a href="http://172.16.30.0/24">172.16.30.0/24</a> => <a href="mailto:tun0x1004@192.168.1.10">tun0x1004@192.168.1.10</a><br><br><br>When pinging from spoke1 to hub:<br>
# ping -I 172.16.30.130 172.16.10.110<br>PING 172.16.10.110 (172.16.10.110): 56 data bytes<br>64 bytes from <a href="http://172.16.10.110">172.16.10.110</a>: icmp_seq=0 ttl=64 time=3.2 ms<br>64 bytes from <a href="http://172.16.10.110">172.16.10.110</a>: icmp_seq=1 ttl=64 time=2.3 ms<br>
<br>When pinging from spoke1 to spoke2:<br># ping -I 172.16.30.130 172.16.60.160<br>PING 172.16.60.160 (172.16.60.160): 56 data bytes<br>64 bytes from <a href="http://172.16.60.160">172.16.60.160</a>: icmp_seq=0 ttl=63 time=12.7 ms<br>
64 bytes from <a href="http://172.16.60.160">172.16.60.160</a>: icmp_seq=1 ttl=63 time=4.6 ms<br><br>Tcpdump on spoke1 when pinging from spoke1 to spoke2:<br># tcpdump -ni ipsec0 icmp<br>tcpdump: listening on ipsec0<br>00:34:17.262268 172.16.30.130 > <a href="http://172.16.60.160">172.16.60.160</a>: icmp: echo request (DF)<br>
00:34:17.266201 172.16.60.160 > <a href="http://172.16.30.130">172.16.30.130</a>: icmp: echo reply<br><br>And tcpdump on hub when pinging from spoke1 to spoke2:<br># tcpdump -ni ipsec0 icmp<br>tcpdump: listening on ipsec0<br>
16:29:56.543048 172.16.30.130 > <a href="http://172.16.60.160">172.16.60.160</a>: icmp: echo request (DF)<br>16:29:56.543527 172.16.30.130 > <a href="http://172.16.60.160">172.16.60.160</a>: icmp: echo request (DF)<br>
16:29:56.545636 172.16.60.160 > <a href="http://172.16.30.130">172.16.30.130</a>: icmp: echo reply<br>16:29:56.546168 172.16.60.160 > <a href="http://172.16.30.130">172.16.30.130</a>: icmp: echo reply<br><br><br>-------------------------------------------------------------------------------------------------------------------------------------<br>
For the Openswan setup, the IP addresses are as follows:<br>Hub - 172.16.50.150 - 192.168.1.50<br>Spoke1 - 172.16.40.140 - 192.168.1.40<br>Spoke2 - 172.16.20.120 - 192.168.1.20<br><br>Hub's ipsec.conf<br>
-----------------------<br>
config setup<br>
interfaces = "ipsec0=eth1"<br>
klipsdebug = none<br>
plutodebug = none<br>
uniqueids = yes<br>
hidetos = no<br>
conn t50to40<br>
type = tunnel<br>
left = 192.168.1.50<br>
right = 192.168.1.40<br>
leftnexthop = 192.168.1.1<br>
leftsubnet = <a href="http://172.16.50.0/24">172.16.50.0/24</a><br>
rightsubnet = <a href="http://172.16.40.0/24">172.16.40.0/24</a><br>
auto = start<br>
keyexchange = ike<br>
authby = secret<br>
auth = esp<br>
keyingtries = 0<br>
esp = AES128-SHA1<br>
pfs = yes<br>
rekey = yes<br>
leftid = 192.168.1.50<br>
rightid = 192.168.1.40<br>
ike = 3DES-SHA-MODP1024<br>
ikelifetime = 28800s<br>
keylife = 86400s<br>
rekeymargin = 10m<br>
rekeyfuzz = 20%<br>
conn t50to20<br>
type = tunnel<br>
left = 192.168.1.50<br>
right = 192.168.1.20<br>
leftnexthop = 192.168.1.1<br>
leftsubnet = <a href="http://172.16.50.0/24">172.16.50.0/24</a><br>
rightsubnet = <a href="http://172.16.20.0/24">172.16.20.0/24</a><br>
auto = start<br>
keyexchange = ike<br>
authby = secret<br>
auth = esp<br>
keyingtries = 0<br>
esp = AES128-SHA1<br>
pfs = yes<br>
rekey = yes<br>
leftid = 192.168.1.50<br>
rightid = 192.168.1.20<br>
ike = 3DES-SHA-MODP1024<br>
ikelifetime = 28800s<br>
keylife = 86400s<br>
rekeymargin = 10m<br>
rekeyfuzz = 20%<br><br>Hub's eroutes<br>
-----------------------<br>
0 <a href="http://172.16.20.0/24">172.16.20.0/24</a> -> <a href="http://172.16.40.0/24">172.16.40.0/24</a> => <a href="mailto:tun0x1016@192.168.1.40">tun0x1016@192.168.1.40</a><br>0 <a href="http://172.16.40.0/24">172.16.40.0/24</a> -> <a href="http://172.16.20.0/24">172.16.20.0/24</a> => <a href="mailto:tun0x1014@192.168.1.20">tun0x1014@192.168.1.20</a><br>
2 <a href="http://172.16.50.0/24">172.16.50.0/24</a> -> <a href="http://172.16.20.0/24">172.16.20.0/24</a> => <a href="mailto:tun0x1014@192.168.1.20">tun0x1014@192.168.1.20</a><br>12 <a href="http://172.16.50.0/24">172.16.50.0/24</a> -> <a href="http://172.16.40.0/24">172.16.40.0/24</a> => <a href="mailto:tun0x1016@192.168.1.40">tun0x1016@192.168.1.40</a><br>
<br>
<br>
Spoke1's ipsec.conf<br>
-----------------------<br>
config setup<br> interfaces = "ipsec0=eth1"<br> klipsdebug = none<br> plutodebug = none<br> plutoload = %search<br> plutostart = %search<br> uniqueids = yes<br> hidetos = no<br>
conn t40to50<br> type = tunnel<br> left = 192.168.1.40<br> right = 192.168.1.50<br> leftnexthop = 192.168.1.1<br> leftsubnet = <a href="http://172.16.40.0/24">172.16.40.0/24</a><br> rightsubnet = <a href="http://172.16.50.0/24">172.16.50.0/24</a><br>
auto = start<br> keyexchange = ike<br> authby = secret<br> auth = esp<br> keyingtries = 0<br> esp = AES128-SHA1<br> pfs = yes<br> rekey = yes<br> leftid = 192.168.1.40<br>
rightid = 192.168.1.50<br> ike = 3DES-SHA-MODP1024<br> ikelifetime = 28800s<br> keylife = 86400s<br> rekeymargin = 10m<br> rekeyfuzz = 20%<br><br>Spoke1's eroutes<br>
-----------------------<br>
2 <a href="http://172.16.20.0/24">172.16.20.0/24</a> -> <a href="http://172.16.40.0/24">172.16.40.0/24</a> => <a href="mailto:tun0x1008@192.168.1.50">tun0x1008@192.168.1.50</a><br>2 <a href="http://172.16.20.0/24">172.16.20.0/24</a> -> <a href="http://172.16.50.0/24">172.16.50.0/24</a> => <a href="mailto:tun0x1008@192.168.1.50">tun0x1008@192.168.1.50</a><br>
<br>Spoke2's ipsec.conf<br>
-----------------------<br>config setup<br> interfaces = "ipsec0=eth1"<br> klipsdebug = none<br> plutodebug = none<br> plutoload = %search<br> plutostart = %search<br> uniqueids = yes<br>
hidetos = no<br>conn t20to50<br> type = tunnel<br> left = 192.168.1.20<br> right = 192.168.1.50<br> leftnexthop = 192.168.1.1<br> leftsubnet = <a href="http://172.16.20.0/24">172.16.20.0/24</a><br>
rightsubnet = <a href="http://172.16.50.0/24">172.16.50.0/24</a><br> auto = start<br> keyexchange = ike<br> authby = secret<br> auth = esp<br> keyingtries = 0<br> esp = AES128-SHA1<br>
pfs = yes<br> rekey = yes<br> leftid = 192.168.1.20<br> rightid = 192.168.1.50<br> ike = 3DES-SHA-MODP1024<br> ikelifetime = 28800s<br> keylife = 86400s<br> rekeymargin = 10m<br>
rekeyfuzz = 20%<br><br>Spoke2's eroutes<br>
-----------------------<br>
549 <a href="http://172.16.40.0/24">172.16.40.0/24</a> -> <a href="http://172.16.20.0/24">172.16.20.0/24</a> => <a href="mailto:tun0x100c@192.168.1.50">tun0x100c@192.168.1.50</a><br>12 <a href="http://172.16.40.0/24">172.16.40.0/24</a> -> <a href="http://172.16.50.0/24">172.16.50.0/24</a> => <a href="mailto:tun0x100c@192.168.1.50">tun0x100c@192.168.1.50</a><br>
<br><br>When pinging from spoke1 to hub:<br># ping -I 172.16.20.120 172.16.50.150<br>PING 172.16.50.150 (172.16.50.150): 56 data bytes<br>64 bytes from <a href="http://172.16.50.150">172.16.50.150</a>: icmp_seq=0 ttl=64 time=12.4 ms<br>
64 bytes from <a href="http://172.16.50.150">172.16.50.150</a>: icmp_seq=1 ttl=64 time=10.4 ms<br><br>
When pinging from spoke1 to spoke2:<br># ping -I 172.16.20.120 172.16.40.140<br>PING 172.16.40.140 (172.16.40.140): 56 data bytes<br><br>--- 172.16.40.140 ping statistics ---<br>8 packets transmitted, 0 packets received, 100% packet loss<br>
<br>Tcpdump on spoke1 when pinging from spoke1 to spoke2:<br># tcpdump -ni ipsec0 icmp<br>tcpdump: listening on ipsec0<br>16:33:49.927435 172.16.20.120 > <a href="http://172.16.40.140">172.16.40.140</a>: icmp: echo request (DF)<br>
16:33:50.927440 172.16.20.120 > <a href="http://172.16.40.140">172.16.40.140</a>: icmp: echo request (DF)<br><br>
And tcpdump on hub when pinging from spoke1 to spoke2:<br># tcpdump -ni ipsec0 icmp<br>tcpdump: listening on ipsec0<br><br>0 packets received by filter<br>0 packets dropped by kernel<br><br><br>I can ping from the hub to spoke2:<br>
# ping -I 172.16.50.150 172.16.40.140<br>PING 172.16.40.140 (172.16.40.140): 56 data bytes<br>64 bytes from <a href="http://172.16.40.140">172.16.40.140</a>: icmp_seq=0 ttl=64 time=3.3 ms<br>64 bytes from <a href="http://172.16.40.140">172.16.40.140</a>: icmp_seq=1 ttl=64 time=2.1 ms<br>
<br><br><br>
<br>