If I set up a VPN connection for Android, what gets routed over the VPN? Just web browsing? All internet connections from all apps?

In Cyanogenmod, in the Add OpenVPN config, "Advanced" settings, there is an option for "Redirect gateway - Force all traffic to berouted thru the VPN tunnel", which is off by default.

With this off, which apps/communications get routed through it?

The other VPN types do not have this option. Do they work this way or not?

After setting up a VPN, how can I verify that it's working?

3 Answers 3


The setting that you're talking about is in effect the --redirect-gateway option of OpenVPN and is documented on the OpenVPN man page


Automatically execute routing commands to cause all outgoing IP traffic to be redirected over the VPN.

This option performs three steps:

  1. Create a static route for the --remote address which forwards to the pre-existing default gateway. This is done so that (3) will not create a routing loop.

  2. Delete the default gateway route.

  3. Set the new default gateway to be the VPN endpoint address (derived either from --route-gateway or the second parameter to --ifconfig when --dev tun is specified).

When the tunnel is torn down, all of the above steps are reversed so that the original default route is restored.

The routing of all network connections occurs at the system level. Only apps that have the ability to modify the routing table of the device to use a different gateway than the default can bypass the VPN. Theoretically any app with SuperUser access could do this.


Typically, yes.

You're creating a private network -- you want to route stuff through the network. It's private.

If only the browser applications were routing through the private network -- some other app could be sniffing activity, and sending it through the other connection. Goodbye, private!

See Also:

  • 1
    Yes, that's what it should do. I'm asking what it does do, in the specific context of an Android device.
    – endolith
    Commented Nov 8, 2010 at 15:12
  • I haven't found any information saying that any Android VPN implementations are not really VPN implementations -- that they are, indeed, private, virtual networks in the commonly accepted understanding of the term. There is no evidence to suggest otherwise. Commented Nov 8, 2010 at 16:10
  • 1
    No evidence until someone finds some ;) I think the question is, based on the way VPNs are coded in Android is there a way for a rouge (or poorly coded) app to miss/bypass/ignore the VPN & connect through the standard connection? I'm not dev but an example in laymen's terms would be a VPN app that tells Android that all connections should go through it, but a poorly coded app may not even ask Android where to route network traffic & assume it should go about biz as usual. On the other hand if the VPN takes over the connection management entirely I'd feel more comfortable that it'll work.
    – Matt
    Commented Nov 9, 2010 at 2:36
  • There's a comment on android.stackexchange.com/questions/8904/… that says that web browsing does not go through the VPN.
    – endolith
    Commented Oct 10, 2011 at 22:52

If I set up a VPN, does everything go over it?

No, e.g. if one tethers one's Internet connection on the Android phone that is connected to the VPN server, by default the connections going through tethering won't go through the VPN.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .