Page 1 of 1

[Solved] Routing all internet through vpn on Android

Posted: Mon Nov 23, 2015 5:12 pm
by ryan0270
I have a VPN server up and running with all traffic routed through the vpn (push "redirect-gateway def1"). Connecting from a linux client I confirmed this is working fine and I have internet access but connecting from my android phone things aren't working well. The connection itself seems to happen without incident but after that I can't access anything (e.g. checking email times out). Looking at the stats screen for openvpn, the "packet received" field frequently goes up to several seconds which seems odd. Can someone help me track down why this is?

server conf

Code: Select all

port 1194
proto udp
dev tun
ca ...
cert ...
key ...
dh /etc/openvpn/dh2048.pem
server 192.168.10.10 255.255.255.0
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1"
keepalive 10 120
comp-lzo
user nobody
group nobody
persist-key
persist-tun
status openvpn-status.log
verb 3
client conf

Code: Select all

client
dev tun
proto udp
remote 192.168.10.10 1194
resolv-retry infinite
nobind
persist-key
persist-tun

<ca>
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
</ca>

<cert>
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
</cert>

<key>
-----BEGIN PRIVATE KEY-----
...
-----END PRIVATE KEY-----
</key>

remote-cert-tls server
comp-lzo
verb 3

Re: Routing all internet through vpn on Android

Posted: Mon Nov 23, 2015 8:48 pm
by Traffic
ryan0270 wrote:Connecting from a linux client I confirmed this is working fine and I have internet access but connecting from my android phone things aren't working well. The connection itself seems to happen without incident but after that I can't access anything
Check your Android VPN Client log for errors .. post it if you can.

Re: Routing all internet through vpn on Android

Posted: Mon Nov 23, 2015 10:40 pm
by ryan0270
Turns out that I was testing slightly different things on linux vs android. On linux I went to just the first convenient website and on Android the first convenient app was gmail. Testing gmail on linux also failed.

I was eventually able to fix both by adding mssfix 1360 to my server config.

(I tried editing the original subject to show SOLVED but can't figure out how)

Re: Routing all internet through vpn on Android

Posted: Mon Nov 23, 2015 11:21 pm
by Traffic
Thanks for posting details of your solution.

I will ask a Mod to mark as Solved for you.

8-)