<div dir="ltr">Thanks Lennart, it was the NAT issue after all... <div><br></div><div>-Igor</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 18, 2014 at 6:37 PM, Lennart Sorensen <span dir="ltr">&lt;<a href="mailto:lsorense@csclub.uwaterloo.ca" target="_blank">lsorense@csclub.uwaterloo.ca</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Thu, Sep 18, 2014 at 05:43:17PM +0200, Igor Jovanovic wrote:<br>
&gt; Hello,<br>
&gt;<br>
&gt; We have host-to-subnet PSK setup with tunnel up and running - with main<br>
&gt; issue being that the traffic is not being routed into the tunnel.<br>
&gt;<br>
&gt; Our lan (eth3): <a href="http://192.168.100.0/24" target="_blank">192.168.100.0/24</a><br>
&gt; Our encryption domain <a href="http://192.18.0.0/24" target="_blank">192.18.0.0/24</a><br>
&gt; Our public IP (eth1): x.x.194.130/30<br>
&gt; Public nexthop(eth1): x.x.194.129/30<br>
&gt; Our ED IP (eth1:1): <a href="http://192.18.0.1/24" target="_blank">192.18.0.1/24</a><br>
&gt; Other end IP: y.y.34.140<br>
&gt; Other end subnet: <a href="http://6.0.0.0/8" target="_blank">6.0.0.0/8</a><br>
&gt;<br>
&gt; VPN Setup:<br>
&gt;<br>
&gt; config setup<br>
&gt;         klipsdebug=all<br>
&gt;         plutodebug=all<br>
&gt;         protostack=netkey<br>
&gt;         nat_traversal=no<br>
&gt;         virtual_private=<br>
&gt;         oe=off<br>
&gt;<br>
&gt; conn vic-bsc-1<br>
&gt;         forceencaps=yes<br>
&gt;         dpddelay=30<br>
&gt;         dpdtimeout=120<br>
&gt;         dpdaction=restart_by_peer<br>
&gt;         ike=aes256-sha1;modp1024!<br>
&gt;         phase2alg=aes256-sha1<br>
&gt;         ikelifetime=86400s<br>
&gt;         authby=secret<br>
&gt;         type=tunnel<br>
&gt;         salifetime=3600s<br>
&gt;         pfs=no<br>
&gt;         aggrmode=yes<br>
&gt;         left=x.x.194.130<br>
&gt;         leftnexthop=x.x.194.129<br>
&gt;         leftsubnet=<a href="http://198.18.0.0/24" target="_blank">198.18.0.0/24</a><br>
&gt;         right=y.y.34.140<br>
&gt;         rightnexthop=x.x.194.129<br>
&gt;         auto=start<br>
&gt;         rightsubnet=<a href="http://6.0.0.0/8" target="_blank">6.0.0.0/8</a><br>
&gt;<br>
&gt; NAT Rule:<br>
&gt; iptables -t nat -I POSTROUTING 1 -s 0/0 -d <a href="http://6.0.0.0/8" target="_blank">6.0.0.0/8</a> -o eth1 -j SNAT<br>
&gt; --to-source 192.18.0.1<br>
&gt;<br>
&gt; Route:<br>
&gt; ip route add <a href="http://6.0.0.0/8" target="_blank">6.0.0.0/8</a> src 192.18.0.1 via x.x.194.129 dev eth1<br>
&gt;<br>
&gt; Please advise, we are missing something big here!<br>
<br>
</div></div>The tunnel will only allow traffic between <a href="http://6.0.0.0/8" target="_blank">6.0.0.0/8</a> and <a href="http://198.18.0.0/24" target="_blank">198.18.0.0/24</a><br>
If you apply nat, then the traffic is no longer valid and will not go<br>
through your tunnel.<br>
<br>
I suggest you try to get your ipsec working first, then worry about<br>
firewalling afterwards.<br>
<br>
And if it is using netkey, you will have to make sure your firewall<br>
allows traffic of type ipsec (not ipv4) from the other side to come in.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Len Sorensen<br>
</font></span></blockquote></div><br></div>