Skip Navigation

Your mobile device NEEDS firewall profiles

Does the school you go to need to know that you have the Signal app installed on your phone, checking with the Signal servers in the background for new messages? Even if you chose to use a VPN to tunnel your traffic entirely, is there no other option but for your employer to witness you connected to a foreign VPN server? If you connected to a point at your home, even that could be interpreted that you have something hide.

You could have two phones with different sets of apps in your pocket (one for “business” and one for everything else), but you if you don’t want that you have to ask:

Is there a firewall for Android that can block your usual traffic from leaving the device, by turning on a specific profile based on something like the Wi-Fi name? There are quite a few traffic blockers, such as RethinkDNS, Netguard, or personalDNSfilter, but they assume you want to block the same set of traffic regardless of time and place.

15 comments
  • Netguard also has a separate lockdown mode (which only enables a few apps, or none, to go through) that if toggled automatically based on connected network would enable you to dictate which apps can use untrusted networks.

    While there are lots of apps that automate some sort of action based on the name of the WiFi network, activating the lockdown mode in Netguard is more specific, and I doubted if it's even possible. To start, I came up with a Termux command invocation that toggles the lockdown mode in Netguard. After customizing the quick settings (near the notification area) this adb command confirms that this method for toggling Netguard's lockdown mode really works:

     
        
    adb shell cmd statusbar click-tile eu.faircode.netguard/.WidgetLockdown
    
      

    Default Termux doesn't request the necessary permission which impeded the command from running, however:

     
        
    java.lang.SecurityException: StatusBarManagerService: Neither user 10472 nor current process has android.permission.EXPAND_STATUS_BAR.
    
      

    So this is where I'm at, I could probably just use Tasker to like some people do to run the cmd statusbar command, but I also wanted to call some attention to the issue report on the Termux repository regarding this permission.

    EDIT: There's a high likelyhood it won't work on Tasker without root, and on termux it also wouldn't work even if you managed to request the permission.

15 comments