<div dir="ltr">Hi Stephen,<div><br></div><div>So I assume there is no longer any syntax error reported.</div><div><br></div><div>From logfile I see there is no acceptable traffic selector. I assume that you have a home PC (Ubuntu) with Strongswan which you want to connect to the office VPN concentrator with IP <span style="color: rgb(0, 0, 0); white-space: pre-wrap;">17.11.7.5 </span>running Windows. I suppose VPN concentrator in the office is not configured to route any traffic towards you home PC's IP address, thus you will need a virtual IP address assigned to your home PC by the VPN concentrator. Also I suppose you want to route all traffic via that VPN once connected.</div><div><div>Then, please try to modify "left=%defaultroute" to "left=%any" and add "rightsubnet=0.0.0.0/0" and "leftsourceip=%config". You should not specify "leftsubnet", it has same effect as "leftsubnet=%dynamic".</div><div>According to documentation at <a href="https://wiki.strongswan.org/projects/strongswan/wiki/ConnSection">wiki</a> configuration directive "left=defaultroute%" was used prior to version 5.0.0, superseded by "left=%any".<br></div><div>leftsubnet=%dynamic (or omitting leftsubnet at all) and rightsubnet=0.0.0.0/0 will create your traffic selector. It says that anything (0.0.0.0/0) from your side will be routed to remote host and that the remote host will route towards your PC (left==local) a traffic which would fit your dynamically assigned IP. Should you want to route towards office network only office-related traffic then change "rightsubnet=<subnet_used_in_Stephen's_office>".</div><div><div><br></div></div><div>If that didn't help please can you provide output of 'ipsec statusall' and also more details about network topology?</div></div><div><br></div><div>Regards,</div><div>Miroslav</div><div><br>On Saturday, April 18, 2015 at 5:28:12 PM UTC+2, Stephen Feyrer wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">
<div><div>Hi Miroslav,</div><div><br></div><div>Thank you. The conn section as presented below was copied and pasted from web page for convenience (this stripped the leading white spaced from the conn section). For the moment the white spaces are in form of TAB characters. I will test with space characters and complete this email.</div><div><br></div><div>I Apologise for the lack of white spaces in the conn section of below email. I have now tested with both spaces and tabs, each producing the same error as below.</div><div><br></div><div><br></div><div>--</div><div>Kind regards</div><div><br></div><div>Stephen Feyrer.</div><div><br></div><div><br></div><div>On Sat, 18 Apr 2015 13:25:20 +0100, Miroslav Svoboda <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="1mo2Cl-9S4UJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">good...@goodmirek.cz</a>> wrote:<br></div><br><blockquote style="margin:0 0 0.80ex;border-left:#0000ff 2px solid;padding-left:1ex"><div dir="ltr"><div><div>Hi Stephen,</div><div><br></div><div>I believe the issue might be caused as the "conn" section is not compliant with prescribed format. There should be at least one whitespace at the beginning of each line within the section. Only sections can and shall start at the first character of the line.</div><div><br></div><div>Supposed correction:</div><div><div><font face="monospace, monospace"><b>conn VPN-OFFICE-COM</b></font></div><div><font face="monospace, monospace"><b> keyexchange=ikev1</b></font></div><div><b style="font-family:monospace,monospace"> </b><font face="monospace, monospace"><b>type=transport</b></font></div><div><b style="font-family:monospace,monospace"> </b><font face="monospace, monospace"><b>authby=secret</b></font></div><div><b style="font-family:monospace,monospace"> </b><font face="monospace, monospace"><b>ike=3des-sha1-modp1024</b></font></div><div><b style="font-family:monospace,monospace"> </b><font face="monospace, monospace"><b>rekey=no</b></font></div><div><b style="font-family:monospace,monospace"> </b><font face="monospace, monospace"><b>left=%defaultroute</b></font></div><div><b style="font-family:monospace,monospace"> </b><font face="monospace, monospace"><b>leftprotoport=udp/l2tp</b></font></div><div><b style="font-family:monospace,monospace"> </b><font face="monospace, monospace"><b>right=<a href="http://vpn.office.com" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fvpn.office.com\46sa\75D\46sntz\0751\46usg\75AFQjCNGQRLQlVjlUgNcSD2i1qgrVed6G-Q';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fvpn.office.com\46sa\75D\46sntz\0751\46usg\75AFQjCNGQRLQlVjlUgNcSD2i1qgrVed6G-Q';return true;">vpn.office.com</a></b></font></div><div><b style="font-family:monospace,monospace"> </b><font face="monospace, monospace"><b>rightprotoport=udp/l2tp</b></font></div><div><b style="font-family:monospace,monospace"> </b><font face="monospace, monospace"><b>rightid=17.11.7.5</b></font></div><div><b style="font-family:monospace,monospace"> </b><font face="monospace, monospace"><b>auto=add</b></font></div></div><div><br></div><div>Regards,</div><div>Miroslav</div><div><br></div><div>Message: 3</div><div>Date: Fri, 17 Apr 2015 14:08:57 +0100</div><div>From: "Stephen Feyrer" <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="1mo2Cl-9S4UJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">stephen...@btinternet.com</a><wbr>></div><div>To: <a href="javascript:" target="_blank" gdf-obfuscated-mailto="1mo2Cl-9S4UJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">us...@lists.strongswan.org</a></div><div>Subject: Re: [strongSwan] /etc/strongswan.d/VPN.conf:1: syntax error,</div><div> unexpected NAME, expecting NEWLINE or '{' or '=' [vpn]</div><div>Message-ID: <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="1mo2Cl-9S4UJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">op.xw8ms...@sveta.home.<wbr>org</a>></div><div>Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes</div><div><br></div><div>Hi Neol,</div><div><br></div><div>Thank you. I have removed the file /etc/strongswan.d/VPN.conf</div><div><br></div><div>In /etc/ipsec.conf I have the same configuration. At least there is</div><div>progress, unfortunately I am still baffled. This is the previously</div><div>working configuration.</div><div><br></div><div>code:</div><div><br></div><div># ipsec.conf - strongSwan IPsec configuration file</div><div><br></div><div># basic configuration</div><div><br></div><div>config setup</div><div> # strictcrlpolicy=yes</div><div> # uniqueids = no</div><div><br></div><div>conn VPN-OFFICE-COM</div><div>keyexchange=ikev1</div><div>type=transport</div><div>authby=secret</div><div>ike=3des-sha1-modp1024</div><div>rekey=no</div><div>left=%defaultroute</div><div>leftprotoport=udp/l2tp</div><div>right=<a href="http://vpn.office.com" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fvpn.office.com\46sa\75D\46sntz\0751\46usg\75AFQjCNGQRLQlVjlUgNcSD2i1qgrVed6G-Q';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fvpn.office.com\46sa\75D\46sntz\0751\46usg\75AFQjCNGQRLQlVjlUgNcSD2i1qgrVed6G-Q';return true;">vpn.office.com</a></div><div>rightprotoport=udp/l2tp</div><div>rightid=17.11.7.5</div><div>auto=add</div><div><br></div><div><br></div><div>Having restarted ipsec, I get the following result</div><div><br></div><div>code:</div><div><br></div><div># ipsec up VPN-OFFICE-COM</div><div>initiating Main Mode IKE_SA VPN-OFFICE-COM[1] to 17.11.7.5</div><div>generating ID_PROT request 0 [ SA V V V V ]</div><div>sending packet: from 1.2.3.4[500] to 17.11.7.5[500] (212 bytes)</div><div>received packet: from 17.11.7.5[500] to 1.2.3.4[500] (116 bytes)</div><div>parsed ID_PROT response 0 [ SA V V ]</div><div>received draft-ietf-ipsec-nat-t-ike-02\<wbr>n vendor ID</div><div>received FRAGMENTATION vendor ID</div><div>generating ID_PROT request 0 [ KE No NAT-D NAT-D ]</div><div>sending packet: from 1.2.3.4[500] to 17.11.7.5[500] (244 bytes)</div><div>received packet: from 17.11.7.5[500] to 1.2.3.4[500] (304 bytes)</div><div>parsed ID_PROT response 0 [ KE No V V V V NAT-D NAT-D ]</div><div>received Cisco Unity vendor ID</div><div>received XAuth vendor ID</div><div>received unknown vendor ID: [Available On Request]</div><div>received unknown vendor ID: [Available On Request]</div><div>local host is behind NAT, sending keep alives</div><div>generating ID_PROT request 0 [ ID HASH N(INITIAL_CONTACT) ]</div><div>sending packet: from 1.2.3.4[4500] to 17.11.7.5[4500] (84 bytes)</div><div>received packet: from 17.11.7.5[4500] to 1.2.3.4[4500] (84 bytes)</div><div>parsed ID_PROT response 0 [ ID HASH V ]</div><div>received DPD vendor ID</div><div>IKE_SA VPN-OFFICE-COM[1] established between</div><div>1.2.3.4[1.2.3.4]...17.11.7.5[<wbr>17.11.7.5]</div><div>generating QUICK_MODE request [Available On Request] [ HASH SA No ID ID</div><div>NAT-OA NAT-OA ]</div><div>sending packet: from 1.2.3.4[4500] to 17.11.7.5[4500] (220 bytes)</div><div>received packet: from 17.11.7.5[4500] to 1.2.3.4[4500] (180 bytes)</div><div>parsed QUICK_MODE response [Available On Request] [ HASH SA No ID ID</div><div>N((24576)) NAT-OA ]</div><div>received 28800s lifetime, configured 0s</div><div>no acceptable traffic selectors found</div><div>establishing connection 'VPN-OFFICE-COM' failed</div><div><br></div><div><br></div><div><br></div><div>--</div><div>Kind regards</div><div><br></div><div><br></div><div>Stephen Feyrer<br></div></div></div></blockquote></div></blockquote></div></div>