<!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> </div>
<div>I am in the deep end with Openswan and possibly the following will show that. Apologies!</div>
<div> </div>
<div>So far I have been relying heavily on this - <a href="http://www.jacco2.dds.nl/networking/openswan-l2tp.html">http://www.jacco2.dds.nl/networking/openswan-l2tp.html</a></div>
<div> </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> </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> </div>
<div>There is a server acting as the openswan VPN\gateway etc in both offices - current office and new office.</div>
<div> </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> </div>
<div>
<div><em>conn server</em></div>
<div><em> authby=secret</em></div>
<div><em> pfs=no</em></div>
<div><em> auto=add</em></div>
<div><em> keyingtries=3</em></div>
<div><em> type=transport</em></div>
<div><em> forceencaps=yes</em></div>
<div><em> right=%any</em></div>
<div><em> #rightsubnet=vhost:%priv,%no</em></div>
<div><em> rightprotoport=17/%any</em></div>
<div><em> # Using the magic port of "0" means "any one single port". This is</em></div>
<div><em> # a work around required for Apple OSX clients that use a randomly</em></div>
<div><em> # high port, but propose "0" instead of their port. Could also be 17/%any</em></div>
<div><em> left=<my outside fixed IP address></em></div>
<div><em> leftnexthop=<my outside fixed IP address next hop></em></div>
<div><em> leftprotoport=17/1701</em></div>
<div><em> # Apple iOS doesn't send delete notify so we need dead peer detection</em></div>
<div><em> # to detect vanishing clients</em></div>
<div><em> dpddelay=10</em></div>
<div><em> dpdtimeout=90</em></div>
<div><em> dpdaction=clear</em></div>
</div>
<div> </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> </div>
<div>In the new office I have set up a conn like this:</div>
<div> </div>
<div>
<div><em>conn aconn</em></div>
<div><em> authby=secret</em></div>
<div><em> left=192.168.3.3</em></div>
<div><em> #left=%any</em></div>
<div><em> leftid=@vpn</em></div>
<div><em> leftnexthop=%defaultroute</em></div>
<div><em> leftsourceip=192.168.3.3</em></div>
<div><em> leftsubnet=<a href="http://192.168.3.0/24">192.168.3.0/24</a></em></div>
<div><em> right=</em><em><my outside fixed IP address></em></div>
<div><em> 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> type=tunnel</em></div>
<div><em> auto=start</em></div>
<div><em> pfs=no</em></div>
<div><em> salifetime=28800s</em></div>
<div><em> ikelifetime=86400s</em></div>
</div>
<div> </div>
<div>It sits behind a router so left is the local interface. And the subnets are back in the current office.</div>
<div> </div>
<div>It comes up ok:</div>
<div> </div>
<div>
<div><em># service ipsec status</em></div>
<div><em>IPsec running - 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> </div>
<div>I see the routes come up ok on the new office side:</div>
<div> </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> dir out priority 2336 ptype main</em></div>
<div><em> tmpl src 192.168.3.3 dst 203.215.150.142</em></div>
<div><em> 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> dir fwd priority 2336 ptype main</em></div>
<div><em> tmpl src 203.215.150.142 dst 192.168.3.3</em></div>
<div><em> 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> dir in priority 2336 ptype main</em></div>
<div><em> tmpl src 203.215.150.142 dst 192.168.3.3</em></div>
<div><em> 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> dir out priority 2340 ptype main</em></div>
<div><em> tmpl src 192.168.3.3 dst 203.215.150.142</em></div>
<div><em> 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> dir fwd priority 2340 ptype main</em></div>
<div><em> tmpl src 203.215.150.142 dst 192.168.3.3</em></div>
<div><em> 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> dir in priority 2340 ptype main</em></div>
<div><em> tmpl src 203.215.150.142 dst 192.168.3.3</em></div>
<div><em> 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> dir out priority 2344 ptype main</em></div>
<div><em> tmpl src 192.168.3.3 dst 203.215.150.142</em></div>
<div><em> 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> dir fwd priority 2344 ptype main</em></div>
<div><em> tmpl src 203.215.150.142 dst 192.168.3.3</em></div>
<div><em> 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> dir in priority 2344 ptype main</em></div>
<div><em> tmpl src 203.215.150.142 dst 192.168.3.3</em></div>
<div><em> proto esp reqid 16393 mode tunnel</em></div>
</div>
<div> </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> </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> </div>
<div>Is what I am trying to do even possible?</div>
<div> </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>