2

I am trying all sorts of (non-root) security software that allows me to block internet for apps. so far every one needs some kind of fake VPN to gain access to traffic, I guess so no root is needed. I can't have this since I use an actual VPN which gets turned off if I use any of these security apps. is there no way to block internet for apps while using my VPN?

Bricktop
  • 121
  • 1
  • 4

3 Answers3

1

This is possible since Android 8 (when Block connections without VPN feature was added), also you will have to use VPN app which supports Per-App VPN (which is supported since Android 5.0?) e.g. OpenVPN for Android from F-Droid or Google Play.

Assuming you use OpenVPN for Android:

  1. System settings → VPN → tap button with gear icon on the right side of OpenVPN for Android → enable both Always-on VPN and Block connections without VPN.

  2. OpenVPN for Android → tap button with pencil icon on desired profile → swipe to ALLOWED APPS tab → select apps you want to exclude from using VPN → return to main screen → re/connect to VPN using this profile

This was tested on MIUI device, but I think should be pretty much the same on majority of devices (except those whose manufacturers removed or hid Android's default functionality from ROM (like Huawei from EMUI)). Also per app internet control access is built-in by default in MIUI.

xavier_fakerat
  • 10,065
  • 6
  • 41
  • 101
janot
  • 555
  • 3
  • 9
  • 25
0

I don't think it's possible as per this answer: In Android 6, how to deny an app permission to access the network?. To summarise the network permission is classified as 'normal' so it is automatically granted and can't be removed. However you can try to revoke the INTERNET permission using adb.

adb shell pm revoke com.name.app android.permission.INTERNET

I'm 99% sure it won't work, but can't test right now, on mobile. Unfortunately that means a VPN firewall or root + iptables firewall are your only options.

trishmapow
  • 301
  • 3
  • 8
-3

You can try NetGuard, the non-root firewall for Android smartphones. It can help you in restricting the net usage per app.

Firelord
  • 25,084
  • 20
  • 124
  • 286
Yet Zio
  • 15
  • 2