<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Oct 25, 2013 at 11:27 AM, Ccf Cloud <span dir="ltr"><<a href="mailto:ccfcloud@gmail.com" target="_blank">ccfcloud@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Martin,<div class="gmail_extra"><br>Thanks for the quick reply.<br><br><div class="gmail_quote"><div>
<div class="h5">On Thu, Oct 24, 2013 at 12:45 PM, Martin Willi <span dir="ltr"><<a href="mailto:martin@strongswan.org" target="_blank">martin@strongswan.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi,<br>
<div><br>
> I want to route all the traffic originating from android device to be<br>
> tunneled through the gateway using the tun0 interface.<br>
<br>
</div>The Android App does no narrowing itself, that happens on the responder<br>
only. To tunnel all traffic from the Android device, set<br>
leftsubnet=<a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> on the responder.<br></blockquote><div><br></div></div></div><div>So now my Android device proposes both TSi and TSr as <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> and in the gateway I've configured leftsunet as <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a>.</div>
<div>Now when I establish the tunnel, typing "ip route show" in android device shows following:</div><div><br></div><div><div><a href="http://0.0.0.0/1" target="_blank">0.0.0.0/1</a> dev tun0 scope link </div>
<div>default via 10.10.11.1 dev wlan0 </div>
<div><a href="http://10.10.11.0/24" target="_blank">10.10.11.0/24</a> dev wlan0 proto kernel scope link src 10.10.11.5 </div><div>10.10.11.1 dev wlan0 scope link </div><div><a href="http://128.0.0.0/1" target="_blank">128.0.0.0/1</a> dev tun0 scope link</div>
</div><div><br></div></div></div></div></blockquote><div><br></div><div>Correction:</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra">
<div class="gmail_quote"><div></div><div>where <font color="#ff0000">10.10.11.5</font> is the ip address of android device over the wlan0 interface and tun0 also gets same virtual Ip assigned by the gateway.</div><div><br>
</div><div>With this when I run tcpdum on both tun0 and wlan0, I see all the ESP packets going through Wlan0 and not tun0.</div>
<div><br></div><div>What am I missing here? Why is the route added as <a href="http://0.0.0.0/1" target="_blank">0.0.0.0/1</a>? My intention is to route all the traffic originating from my android device to the </div><div class="im">
<div>gateway using the tun0 interface.</div>
<div> </div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
Regards<br>
<span><font color="#888888">Martin<br>
<br>
</font></span></blockquote></div><br></div><div class="gmail_extra">Thanks & Regards</div><div class="gmail_extra"> Sam</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div></div>
</blockquote></div><br></div></div>