Intermittent network access on Android

Official client software for OpenVPN Access Server and OpenVPN Cloud.
Post Reply
vicmorrowshead
OpenVpn Newbie
Posts: 4
Joined: Tue Jun 14, 2016 11:04 pm

Intermittent network access on Android

Post by vicmorrowshead » Tue Jun 14, 2016 11:29 pm

Hello Everyone,

What works ALWAYS:
1) OpenVPN on Unbuntu: no issue at all with Linux desktop clients. All VPN routing and forwarding for the LAN and for the Internet work beautifully.
2) Authentication/Connecting on Android and desktop.

What doesn't work:
Android client (SAME intermittent behavior with OpenVPN Connect, OpenVPN for Android [Arne S.], and OpenVPN Client).

When it doesn't work on Android (same behavior on Samsung Galaxy Note 4 [5.1.1], Samsung J7 [Marshmallow], Samsung Tab 3 [Jellybean]), it doesn't allow access to the LAN and to the Internet (always 100% or 0% - nothing in between), however pinging works to LAN without any issue ALWAYS; but accessing services on LAN directly via IP address: times out or fails).

When it does work, it works perfectly. Everything is forwarded either to the Internet or the LAN, to and fro without any issues. Flawless, fast, and beautiful.

Configuration: tun; nothing dramatic. Basic configuration.

When it does work, it works repeatedly (can disconnect and reconnect), no issues. Then, at some point, it just stops. There are never any issues authenticating nor does it ever disconnect. Also, when it doesn't work, the sent/receive bytes increase as would be expected when trying to go to places on the network. tcpdump for tun0 also is responding as expected to the domains sought after and packets are clearly going in both directions - totally responds to actions on Android client; and client VPN software shows bytes going both ways, but it doesn't work. While it is not working, rebooting the device does not solve the problem: it just flat out stays not working. Then, after some time (without touching anything server or client side), after connecting, it just seemingly magically starts working. The only repeatable observation is this: when I need it to work, it never does. There is perhaps a hidden setting somewhere that is sensitive to my psychological state and responds accordingly. But I haven't found this flag anywhere. Also, Android clients are never in WIFI mode - just to be clear.

I am at a total loss. I see this on all Android devices I have tested with across 3 OpenVPN clients. Again, Linux desktop clients work flawlessly always even while Android clients are not working.

I am totally unable to find a pattern or anything that repeatedly triggers it to fail or succeed except for it being aware of my psychological state as mentioned earlier. When I am in a good mood, it destroys it; when I am in a bad mood, it works and uplifts me. But, this isn't an ideal use-case and I would like to not rely on this if at all possible. When I think I have some routine figured out, then it proves me wrong every time.

What baffles me is that I have not seen forums inundated with this issue. I can't imagine I'm the only person in the universe experiencing this. I probably have one of the more lame and basic set-ups that there are.

Your help is greatly appreciated. Thanks in advance.

.ovpn file:

Code: Select all

client
dev tun
proto udp
remote myplace myport
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
auth-user-pass
reneg-sec 0

vicmorrowshead
OpenVpn Newbie
Posts: 4
Joined: Tue Jun 14, 2016 11:04 pm

Re: Intermittent network access on Android

Post by vicmorrowshead » Sun Jun 19, 2016 3:33 pm

MTU size... Depending on the networks and firewalls involved during the VPN connection, fragmentation occurs. Reducing the mtu size on the server-side tun interface seems to have solved the problem.

Post Reply