With advent of powerful mobile devices, especially on an open platform like Android, people are using it for multi-tasking like downloading torrents, accessing Netflix, BBC, etc.
For a very long time, there has been a constant struggle for developing a kill switch on Android with VPN apps owing to the limited access to the core system. Although starting with Android Nougat 7+, Android OS now comes with a dedicated VPN kill switch. If you do not wish to expose yourself while switching networks or owing to an abrupt disconnection. Kindly continue.
Step 1
Disconnect from PrivateVPN App
Disconnect from PrivateVPN app and make sure the server you wish to connect to is selected from the server list in the home screen of the app.
For the purpose of this guide, I am going to use PrivateVPN Icelandic VPN.
Step 2
Configure Android system settings for persistent connection and kill switch.
Navigate to Android’s Settings - Wireless & networks - VPN page as shown in the image below.
Click on the gear like icon to the right of PrivateVPN label to enter PrivateVPN app specific settings as seen in the image below.
Enable/toggle Always-on VPN option to ON as seen in the image below.
Make sure you get VPN connection as seen in the image below.
Once you have a VPN connection. Enable/toggle Block connections without VPN to ON as seen in the image below.
Android OS will prompt you a question, tap TURN ON to finally enable your manual kill switch for VPN. See the image below.
Voila! You have successfully deployed a manual kill switch on your Android phone with PrivateVPN app. It can also be done with OpenVPN for Android App.
Step 3
Testing your manual Kill switch
Go to PrivateVPN app and disconnect the VPN from there and check if you still have any Internet access on your Android device.
Also try switch Wi-Fi networks or from Wi-Fi to Mobile data and vice-versa and then check if you can access the Internet unless you connect to the VPN by navigating to PrivateVPN app or OpenVPN for Android app manually.
In my testing, this method is robust and blocks all Internet access without a valid VPN connection via PrivateVPN app or OpenVPN for Android App, whichever is configured for kill switch.
Deploy it on your own Android device and enjoy robust kill switch protection on your Android Nougat (7+) or newer device right now.