<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html><body style='font-family: Arial,Helvetica,sans-serif'>
<p>Your server and aconns do not match at all. I would rename the server connto something like roadwarrior and move some of the settings into conn %default - the ones which would apply to every conn such as left, leftnexthop (probably not needed) possibly pfs and auto and add leftsourceip (the server's LAN IP). Create a new conn which you could call aconn if you wanted. The server's aconn should pretty much match the remote's aconn with left and right reversed. (Generally wou don't need to reverse left and right at each end but the use of conn %default means you must). I would also suggest enabling PFS for aconn.</p>
<p>On 2013-09-18 09:49, Paul Young wrote:</p>
<blockquote type="cite" style="padding-left:5px; border-left:#1010ff 2px solid; margin-left:5px"><!-- html ignored --><!-- head ignored --><!-- meta ignored -->
<div dir="ltr">Hi Everyone,
<div>&nbsp;</div>
<div>I am in the deep end with Openswan and possibly the following will show that. Apologies!</div>
<div>&nbsp;</div>
<div>So far I have been relying heavily on this -&nbsp;<a href="http://www.jacco2.dds.nl/networking/openswan-l2tp.html">http://www.jacco2.dds.nl/networking/openswan-l2tp.html</a></div>
<div>&nbsp;</div>
<div>A little bit of background first. We have a just opened a new office and not all the infrastructure is in place as yet.</div>
<div>&nbsp;</div>
<div>So the idea is to use a site to site VPN back to the current office so that all resources can be reached.</div>
<div>&nbsp;</div>
<div>There is a server acting as the openswan VPN\gateway etc in both offices - current office and new office.</div>
<div>&nbsp;</div>
<div>The current office has a number of site to site configs already in place to third parties. I have configured a server side which looks like this:</div>
<div>&nbsp;</div>
<div>
<div><em>conn server</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; authby=secret</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; pfs=no</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; auto=add</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; keyingtries=3</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; type=transport</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; forceencaps=yes</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; right=%any</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; #rightsubnet=vhost:%priv,%no</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; rightprotoport=17/%any</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; # Using the magic port of "0" means "any one single port". This is</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; # a work around required for Apple OSX clients that use a randomly</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; # high port, but propose "0" instead of their port. Could also be 17/%any</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; left=&lt;my outside fixed IP address&gt;</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; leftnexthop=&lt;my outside fixed IP address next hop&gt;</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; leftprotoport=17/1701</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; # Apple iOS doesn't send delete notify so we need dead peer detection</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; # to detect vanishing clients</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; dpddelay=10</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; dpdtimeout=90</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; dpdaction=clear</em></div>
</div>
<div>&nbsp;</div>
<div>behind that is some ppp and xl2tp settings that work well for some of our remote types. but I am looking at pure Ipsec at this point.</div>
<div>&nbsp;</div>
<div>In the new office I have set up a conn like this:</div>
<div>&nbsp;</div>
<div>
<div><em>conn aconn</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; authby=secret</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; left=192.168.3.3</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; #left=%any</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; leftid=@vpn</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; leftnexthop=%defaultroute</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; leftsourceip=192.168.3.3</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; leftsubnet=<a href="http://192.168.3.0/24">192.168.3.0/24</a></em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; right=</em><em>&lt;my outside fixed IP address&gt;</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; rightsubnets={<a href="http://10.134.162.59/32">10.134.162.59/32</a> <a href="http://10.134.210.64/28">10.134.210.64/28</a> <a href="http://192.168.1.0/24">192.168.1.0/24</a>}</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; type=tunnel</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; auto=start</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; pfs=no</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; salifetime=28800s</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; ikelifetime=86400s</em></div>
</div>
<div>&nbsp;</div>
<div>It sits behind a router so left is the local interface. And the subnets are back in the current office.</div>
<div>&nbsp;</div>
<div>It comes up ok:</div>
<div>&nbsp;</div>
<div>
<div><em># service ipsec status</em></div>
<div><em>IPsec running &nbsp;- pluto pid: 11869</em></div>
<div><em>pluto pid 11869</em></div>
<div><em>3 tunnels up</em></div>
<div><em>some eroutes exist</em></div>
</div>
<div>&nbsp;</div>
<div>I see the routes come up ok on the new office side:</div>
<div>&nbsp;</div>
<div>
<div><em># ip xfrm policy</em></div>
<div><em>src <a href="http://192.168.3.0/24">192.168.3.0/24</a> dst <a href="http://10.134.162.59/32">10.134.162.59/32</a></em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; dir out priority 2336 ptype main</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; tmpl src 192.168.3.3 dst 203.215.150.142</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; proto esp reqid 16385 mode tunnel</em></div>
<div><em>src <a href="http://10.134.162.59/32">10.134.162.59/32</a> dst <a href="http://192.168.3.0/24">192.168.3.0/24</a></em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; dir fwd priority 2336 ptype main</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; tmpl src 203.215.150.142 dst 192.168.3.3</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; proto esp reqid 16385 mode tunnel</em></div>
<div><em>src <a href="http://10.134.162.59/32">10.134.162.59/32</a> dst <a href="http://192.168.3.0/24">192.168.3.0/24</a></em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; dir in priority 2336 ptype main</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; tmpl src 203.215.150.142 dst 192.168.3.3</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; proto esp reqid 16385 mode tunnel</em></div>
<div><em>src <a href="http://192.168.3.0/24">192.168.3.0/24</a> dst <a href="http://10.134.210.64/28">10.134.210.64/28</a></em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; dir out priority 2340 ptype main</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; tmpl src 192.168.3.3 dst 203.215.150.142</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; proto esp reqid 16389 mode tunnel</em></div>
<div><em>src <a href="http://10.134.210.64/28">10.134.210.64/28</a> dst <a href="http://192.168.3.0/24">192.168.3.0/24</a></em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; dir fwd priority 2340 ptype main</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; tmpl src 203.215.150.142 dst 192.168.3.3</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; proto esp reqid 16389 mode tunnel</em></div>
<div><em>src <a href="http://10.134.210.64/28">10.134.210.64/28</a> dst <a href="http://192.168.3.0/24">192.168.3.0/24</a></em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; dir in priority 2340 ptype main</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; tmpl src 203.215.150.142 dst 192.168.3.3</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; proto esp reqid 16389 mode tunnel</em></div>
<div><em>src <a href="http://192.168.3.0/24">192.168.3.0/24</a> dst <a href="http://192.168.1.0/24">192.168.1.0/24</a></em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; dir out priority 2344 ptype main</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; tmpl src 192.168.3.3 dst 203.215.150.142</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; proto esp reqid 16393 mode tunnel</em></div>
<div><em>src <a href="http://192.168.1.0/24">192.168.1.0/24</a> dst <a href="http://192.168.3.0/24">192.168.3.0/24</a></em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; dir fwd priority 2344 ptype main</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; tmpl src 203.215.150.142 dst 192.168.3.3</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; proto esp reqid 16393 mode tunnel</em></div>
<div><em>src <a href="http://192.168.1.0/24">192.168.1.0/24</a> dst <a href="http://192.168.3.0/24">192.168.3.0/24</a></em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; dir in priority 2344 ptype main</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; tmpl src 203.215.150.142 dst 192.168.3.3</em></div>
<div><em>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; proto esp reqid 16393 mode tunnel</em></div>
</div>
<div>&nbsp;</div>
<div>Can't ping anything back in the current office from the new office even though I can see encapsulated traffic going across at the time of my ping - nothing comes back.</div>
<div>&nbsp;</div>
<div>I also don't see anything being created in the xfrm policy for the current office and if I add a rightsubnet(s) line to the current office config then the road runners types can't connect.</div>
<div>&nbsp;</div>
<div>Is what I am trying to do even possible?</div>
<div>&nbsp;</div>
<div>Thanks,</div>
<div>Paul</div>
</div>
<br />
<pre>_______________________________________________
<a href="mailto:Users@lists.openswan.org">Users@lists.openswan.org</a>
<a href="https://lists.openswan.org/mailman/listinfo/users">https://lists.openswan.org/mailman/listinfo/users</a>
Micropayments: <a href="https://flattr.com/thing/38387/IPsec-for-Linux-made-easy">https://flattr.com/thing/38387/IPsec-for-Linux-made-easy</a>
Building and Integrating Virtual Private Networks with Openswan:
<a href="http://www.amazon.com/gp/product/1904811256/104-3099591-2946327?n=283155">http://www.amazon.com/gp/product/1904811256/104-3099591-2946327?n=283155</a>
</pre>
</blockquote>
</body></html>