[Solved] Routing all internet through vpn on Android

Official client software for OpenVPN Access Server and OpenVPN Cloud.
Locked
ryan0270
OpenVpn Newbie
Posts: 18
Joined: Wed Feb 26, 2014 5:36 pm

[Solved] Routing all internet through vpn on Android

Post by ryan0270 » Mon Nov 23, 2015 5:12 pm

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

User avatar
Traffic
OpenVPN Protagonist
Posts: 4066
Joined: Sat Aug 09, 2014 11:24 am

Re: Routing all internet through vpn on Android

Post by Traffic » Mon Nov 23, 2015 8:48 pm

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.

ryan0270
OpenVpn Newbie
Posts: 18
Joined: Wed Feb 26, 2014 5:36 pm

Re: Routing all internet through vpn on Android

Post by ryan0270 » Mon Nov 23, 2015 10:40 pm

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)

User avatar
Traffic
OpenVPN Protagonist
Posts: 4066
Joined: Sat Aug 09, 2014 11:24 am

Re: Routing all internet through vpn on Android

Post by Traffic » Mon Nov 23, 2015 11:21 pm

Thanks for posting details of your solution.

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

8-)

Locked