On an android phone, stock or modded rom, is it possible to force the use of VPN? E.g. only allow traffic tunneled by VPN, don't allow traffic without using VPN to make sure that no unencrypted traffic leaks. Thanks for any hint!
Answering an old question, I know, but Android 4.2 has "Always-on VPN" in the menu on the VPN Settings page: setting a VPN profile under this will maintain the VPN connection, and only allow network traffic when connected to it.
(It may have been added in an earlier version of Android, but my Nexus 7 auto-updated before I got around to setting up the VPN :)
- Depending on your needs, you might want to restrict bridge access via a whitelist. (Please see comments)
- This isn't a true VPN, but provides the same functionality.
- Orbot can force ALL traffic or app-specific traffic.
- Orbot [02/20/12] 0.2.3.10-alpha-orbot-1.0.7-FINAL.apk
SSHTunnel is an ssh tunnel/vpn solution for Android. When I first found SSHTunnel, users were forced to use an application's settings to use SOCK5 proxy, but now sshtunnel can handle per application and global use on its own. Just like rooting is required to get the full functionality of Orbot, you will need a rooted device in order to get what you need from SSHTunnel.
Although this is not a VPN, this is a much simpler setup that will give you an encrypted tunnel to your server. You can interact with your server through this connection directly, or use it to receive or bounce traffic outwards.
- Note: Unencrypted traffic sent to your server (ie http) will be encrypted through your ssh tunnel, but it will still be clear/unencrypted once it leaves your server.
Links & QR