Top
Best
New

Posted by transpute 10/24/2024

NetGuard – rootless Android outbound per-app OSS firewall, like LittleSnitch(netguard.me)
253 points | 136 comments
okso 10/24/2024|
Installing NetGuard was revelation regarding the amount of tracking in most Android apps.

You can configure it to block access by default and notify you every time an app attempts a new connection. And it rings all the time.

Some software call home at 4am every day, other every hour, some send data to a dozen "analytics" services - services that I never opted-in for, which shows how few apps respect the RGPD.

At least most apps still work when those are blocked, and NetGuard allows you to block connections to Google servers except for Google Apps, which network firewalls and DNS solutions can't.

mmooss 10/25/2024||
> NetGuard allows you to block connections to Google servers except for Google Apps, which network firewalls and DNS solutions can't.

How do you know those connections are blocked and not merely bypassing Netguard?

okso 10/26/2024||
I am using GrapheneOS. GrapheneOS has a compatibility layer providing the option to install and use the official releases of Google Play in the standard app sandbox.

See https://grapheneos.org/features#sandboxed-google-play

NetGuard also shows network requests from GrapheneOS itself, all proxied by the GrapheneOS project, as described here: https://grapheneos.org/faq#default-connections

mmooss 10/26/2024||
I could see how they are blocked on your system, using GrapheneOS, but that doesn't tell us if Netguard blocks them on Android systems. One reason for GrapheneOS is to close that kind of hole.
0x1ceb00da 10/24/2024|||
> Some software call home at 4am every day

Which app?

okso 10/26/2024||
Not sure anymore since I removed them, it may have been BlaBlaCar and/or Tricount.
daghamm 10/24/2024||
[flagged]
PawgerZ 10/24/2024||
I'm curious, how would looking at the Microsoft MFA app convince me that android apps aren't spying on me?
daghamm 10/24/2024||
[flagged]
mistermann 10/24/2024||
You did the same thing above but in the opposite direction.
dsissitka 10/24/2024||
From the developer of FairEmail.

Every once in a while I consider making the switch to KeePassXC. I trust KeePassXC but I don't really trust the mobile apps so last time around I looked into NetGuard. It's really nice but it wasn't a good fit for my use case:

> NetGuard will do its best, but it is limited by the fact it must use the Android VPN service. This is the trade-off required to make a firewall which does not require root access. The firewall can only start when Android "allows" it to start, so it will not offer protection during early boot-up (although you can disable your network before rebooting). Also, the Android VPN service needs to be restarted to apply new rules when connectivity has changed or when the screen is being turned on or off. It will, however, be much better than nothing.

I believe that also means you can't use it with Tailscale or similar.

distances 10/24/2024||
> I trust KeePassXC but I don't really trust the mobile apps

I'm using Keepass2Android Offline. It doesn't have the network permission, which for me adds a ton of trust already.

Of course there are other ways to infiltrate data too, but you can be only so paranoid if you want to get things done.

https://play.google.com/store/apps/details?id=keepass2androi...

dugite-code 10/24/2024|||
> I believe that also means you can't use it with Tailscale or similar.

You sort of can. It can route over a socks5 proxy to the work profile where you can have a second VPN running. Wouldn't be an easy solution, but it can work

3np 10/24/2024||
Would be curious to hear if anyone actually did (or attempted) this and have results to share.

I know I have experienced VPN leaks on Android (not the one they publically fixed as it was after). A second layer wouldn't fix that properly but it should make it less likely.

dugite-code 10/24/2024||
Here you go, a fairly detailed blog post about it: https://itsignacioportal.github.io/netguard-pdnsf-any-vpn-co...

Got this from a thread about Tracker Control, a NetGuard fork, and VPN chaining https://github.com/TrackerControl/tracker-control-android/is...

3np 10/25/2024||
Amazing, thank you!
seanw444 10/24/2024|||
> I trust KeePassXC but I don't really trust the mobile apps

Even KeePassDX? That's what I use, and it's been rock solid for me.

transpute 10/24/2024||
> better than nothing

Is "nothing" the only Android per-app outbound firewall alternative to NetGuard?

Springtime 10/24/2024|||
At the OS level LineageOS offers per-app network permissions, which I've used and functions as expected.

One quirk from what I understand of this ticket[1] is if there's a proxy set up via a separate internet allowed app it can bypass the restriction via that app. GrapheneOS' implementation is said to prevent this.

[1] https://gitlab.com/LineageOS/issues/android/-/issues/3228

thatloststudent 10/24/2024||||
There's RethinkDNS [1](not affiliated to them, just like their software). Sometimes it gets killed on my phone, but otherwise it's a great replacement, adds some much-needed features like proxies and wireguard VPNs on top of a DNS and app level control.

[1] - https://f-droid.org/packages/com.celzero.bravedns/

colordrops 10/24/2024||||
No, if you have a rooted phone you can use AFWall+. And there are other non-root firewalls.
pmontra 10/24/2024||||
I've been using Blockada for many years but that's a firewall against ads and trackers. No ads inside apps.

Ideally I would use NetGuard to block the apps and Blockada to block ads and trackers for the apps that I allowed to perform network traffic in NetGuard. But Android allows only one active VPN and they can't be chained, so it's a hard choice. Actually it's not so hard: I keep blocking ads and trackers.

Onavo 10/24/2024|||
Blockada is most likely a DNS level blocker, netguard supports that. Alternatively you can configure it to point the DNS servers at NextDNS if you just want a nice UI to configure block lists (though NextDNS might track you).
esperent 10/24/2024||
NextDNS as a manual DNS server on Android is the adblocking solution I've been using for years. Is there any reason to believe they would track you, any more than any other DNS provider?
trissi1996 10/24/2024||
Unlike most other dns providers, they often have an account or even payment to identify you, not just your outbound IP....
esperent 10/24/2024||
Do they keep logs though?
miroljub 10/24/2024||
That's the whole point, you don't know if they keep logs.
saint_yossarian 10/24/2024|||
NetGuard does ad-blocking with a DNS blacklist, but it's a Pro feature (which I use and works great).
flanbiscuit 10/24/2024||
On NetGuard's F-Droid page it lists "Optionally block ads using a hosts file" under its "features" section and not under its "PRO Features" section

Seems like I can get ad blocking for free.

https://f-droid.org/en/packages/eu.faircode.netguard/

https://github.com/M66B/NetGuard/blob/master/ADBLOCKING.md

saint_yossarian 10/25/2024||
Oh you're probably right, it's been a while since I was on the free version :)
catlikesshrimp 10/24/2024||||
My favorite is another FOSS, but this one is special because it doesn't need network permissions. No root, ofc, so that sticks.

Karma Firewall https://f-droid.org/packages/net.stargw.fok/

saganus 10/24/2024|||
I have used GlassWire (not affiliated) for a few years without issues.

It's also rootless so I assume it has the same restrictions, but it's been very helpful with apps like Uber, which I use seldomly, but prefer not to have their notifications shoved in my face every 30 minutes.

It's also helpful for disabling access to most of the bloatware that comes with e.g. Samsung phones and such.

Probably not blocking everything, but I feel like it's at least something.

aucisson_masque 10/24/2024||
Pcapdroid is a very good alternative that allows to see which connections are made from what app to what server and at what time.

You just leave it in background, check one day later and see what sneaky app you never thought of have been sending tons of data in the background.

For me it helped me remove and search alternative for 4 apps, including a pill reminder (mytherapy). I would never have thought the trade-off to be reminded to take vitamin would be to constantly spy on me and sell all my data. Had i known, I would have put a reminder in my calendar.

boneitis 10/24/2024||
Thanks for chiming in; I will probably try this out in the near future and see what insights I can glean.

Kind of wish there was more discussion about solutions for rooted devices and how much unwanted traffic is already blocked by AdAway (in rooted mode).

baby_souffle 10/24/2024|||
> including a pill reminder (mytherapy)

This is an app you wanted to replace? Or this is one of the apps that you found to be a good replacement?

(I am also looking for a basic medication reminder/logging app)

aucisson_masque 10/24/2024||
no that's the rogue app.

i checked on the play store, all full of trackers. open source is great but always having issue, either it lacks functionalities or it's buggy.

at the end, i decided i could put a reminder on my phone and be done with that.

miroljub 10/24/2024|||
Netguard does the same. You can see a per-app list of connections. Furthermore, you can many hosts either globally, or on an app level.
g-b-r 10/24/2024||
Except that... that doesn't block anything??
aucisson_masque 10/24/2024|||
it can block, i think it's a 'donation' feature.

anyway, it's not the same as netguard. Pcapdroid helps to identify bad application that you can either remove, or if not possible, use netguard later on to block.

g-b-r 10/24/2024||
> it can block, i think it's a 'donation' feature.

Oh, interesting, I didn't know. A pity that you have to purchase it on the Play Store

> anyway, it's not the same as netguard. Pcapdroid helps to identify bad application that you can either remove, or if not possible, use netguard later on to block.

Well, almost all closed-source apps, and especially many system applications, send data out all the time; blocklisting rather than whitelisting is not a great strategy.

NetGuard allows exporting to PCAP as well, anyhow, as a paid feature

octygen 10/24/2024|||
Yeah, but you can just uninstall offenders
aucisson_masque 10/24/2024|||
What about microsoft office ?

I want to be able to open word and excel file on my phone, but i don't want to give microsoft access to everything on my phone including dick pics, sextape, bank sheet and other personal data.

Because android allows such bad practice, blocking internet access can be usefull.

g-b-r 10/24/2024|||
With a firewall you can keep using them, instead (and maybe only let through some of the traffic)
qwertox 10/24/2024||
Its' really telling that Google doesn't offer an API to access a firewall which provides a clear list of connections and the apps which create them and a way to prohibit such specific connections, possibly also according to blacklists.

They really don't want users to have control over this.

alexashka 10/24/2024||
It's more telling that governments haven't made it a mandatory feature on all devices with networking capabilities.

Google hasn't made a successful product in over a decade (nor have their existing products improved in any meaningful sense) - these people are not capable of anything besides hoarding power (and passing leet code I guess :P).

ilbeeper 10/24/2024||
Is it? Do Fedora or Ubuntu provide an API like that?
lightdot 10/24/2024|||
You mean, like unrestricted access to the kernel with full firewalling capabilities? ;)

Yes, GNU/Linux distributions provide exactly that.

irundebian 10/24/2024||
No, you have to install additional software for that.
prophesi 10/24/2024||
The linux kernel has a built-in firewall, and provides iptables to configure it. Firewalld is also installed by default at least on Fedora, and UFW for debian-based.

Unless this is just a battle of semantics on the fact iptables/firewalld/ufw are user space apps.

irundebian 10/24/2024||
There is no clean interface to configure app-based network rules.
prophesi 10/24/2024|||
I think the main gripe is Google's lack of API to access a firewall. It would make sense for the kernel to provide that API and leave the UI to user space apps.

Edit: and to clarify, you can have a user space app on Android to configure a firewall but they will either require root or a VPN-based solution like NetGuard.

bragr 10/24/2024|||
Both SELinux and AppArmor support per app network rules, however they both leave something to be desired in terms of ease of use and features.

https://selinuxproject.org/page/NetworkStatements

https://manpages.ubuntu.com/manpages/bionic/en/man5/apparmor...

kristofferg 10/24/2024|||
Yes.
t0bia_s 10/24/2024||
It drains battery because of VPN service solution, which is only non-rooted solution. Also if you use VPN (like Wireguard), you cannot use both.

Every app has own settings for allowing WiFi, data, VPN, background data connections natively in Android. I use custom ROM that has turned off internet connection for all apps by default and you need manually allow them to connect. Which solve mine problem with constant unwanted connections.

If you want really control over traffic on Android and combine with VPN, try ReThing DNS.

https://www.rethinkdns.com/

baby_souffle 10/24/2024||
> It drains battery because of VPN service solution, which is only non-rooted solution.

It's not the _only_ solution. If you're on a modern (read: last 6 years or so) version of android, you can specify a DNS over TLS server to use.

If that DNS server also happens to be a PiHole, you have a good filter mechanism that doesn't hit battery life / data quotas quite like an always-on VPN does.

It's a bit old, but I put together a basic project for this here: https://github.com/kquinsland/skyhole/

t0bia_s 10/24/2024||
I prefer to connect via Wireguard to home network that has DNS filters (ie Pi-hole or NextDNS), because I can benefit with connection to home network any time.
g-b-r 10/24/2024||
> It drains battery because of VPN service solution

It doesn't really, just try it (and take actual battery duration measurements, Android misreports VPN apps battery usages)

t0bia_s 10/24/2024||
I did, battery drains 5-10% faster.
g-b-r 10/24/2024||
If it's so, it's not a lot for privacy and security

---

ReThink DNS uses the VPN service as well, by the way.

And it is possible to use two VPN apps, see https://news.ycombinator.com/item?id=41933464 (yes, the battery usage adds up).

Rethink DNS seems fine, anyhow.

ignoramous 10/24/2024|||
(I work on rdns)

> ReThink DNS uses the VPN service as well, by the way.

Rethink (since a year ago) has had the ability forward connections per-app to multiple WireGuard upstreams at the same time.

https://old.reddit.com/r/rethinkdns/comments/15r1eq9/v055_mu... / https://archive.md/RqUPe (to us, it turned out to be a deceptively difficult thing to integrate with the rest of the firewall).

thatloststudent 10/24/2024||
Not really on topic, but is there any plan on integrating tailscale with it? There's a userspace mode for tailscale that exposes a socks proxy, but you currently have to spawn that with Termux or another terminal, then forward your traffic on Rethink.
ignoramous 10/24/2024||
Yes (short of anyone sponsoring us to implement it immediately) we do plan to add tsnet support (https://github.com/celzero/rethink-app/issues/1047) once we iron out existing issues with WireGuard.

I'm unsure if we'd be able to support all of Tailscale's features as easily (taildrop, exit nodes etc), we'll see.

bramhaag 10/24/2024||
I occasionally set up notifications when apps make requests using NetGuard and let it run for a day. The result is always depressing, lots of apps phoning home that I haven't opened in days...

I let it run today, and the worst offenders I have installed are Spotify (various requests to Facebook endpoints, I have no Facebook integration turned on) and Speedtest (constant requests to their logging endpoint and ad partners). This is all happening without me actually using those apps.

colordrops 10/24/2024||
If you use a rootless firewall doesn't it act like a VPN? And then you aren't able to use VPNs unless you disable it? Useless IMO for heavy VPN users.
attendant3446 10/24/2024|
You can split the usage by profiles (e.g. work profile with Shelter[1]) or separate users.

1. https://f-droid.org/en/packages/net.typeblog.shelter/

g-b-r 10/24/2024||
You can also have NetGuard actually go through the VPN (https://news.ycombinator.com/item?id=41933464)
notpushkin 10/24/2024||
This is really good. Using it on my Oculus to block connections to Facebook servers.

(On my phones, I use LineageOS which can manage network permissions per app right in app settings.)

noname120 10/24/2024||
AdGuard is also rootless, but in addition if you have root then it can install a system-wide certificate that enables it to decrypt HTTPS requests to do granular filtering (not just at the domain level). Basically just like uBlock does, except that it's system-wide and works in all apps[1].

[1] Except apps that pin their certificates. But you can exclude those or install another module[2] (not from AdGuard) which disables certificate pinning.

[2] For example: https://github.com/cryptoexpertssss/TrustMeAlready

p0w3n3d 10/24/2024|
I'm using netguard. It's really good, but conflicts with wireguard (another VPN I am using). It's because the firewall is realised using VPN API, when running netguard it uses VPN API to control the traffic
oever 10/24/2024||
You could put a firewall at the other end of the wireguard connection.
qwertox 10/24/2024|||
This doesn't tell you which app is connecting to which IP.
mmooss 10/25/2024||
You'd need a local client for the VPN server firewall, to configure it, view logs, etc. Just a web client would work.
okso 10/24/2024||
I am dreaming of an open-source app that adds Wireguard capabilities to NetGuard or vice-versa.

Having to switch from one to the other is very annoying.

thatloststudent 10/24/2024|||
There's no need to dream about it, it already exists: https://f-droid.org/packages/com.celzero.bravedns/

I used to use it when I wasn't on grapheneOS and needed to block internet access.

bubblesnort 10/25/2024|||
That only uses wg for DNS queries. Everything else remains untunneled.
thatloststudent 10/25/2024||
From what I see running the test on my phone, there's an option to tunnel DNS through Rethink here, which you can change to the VPN's DNS. Everything else is tunneled by default through wireguard. Maybe there's a configuration issue on your end?
bubblesnort 10/25/2024||
The only place I see where wireguard can be set up is as a proxy for DNS. Perhaps that would still allow changing the default gateway?
miroljub 10/24/2024|||
It's annoying to see so much RethinkDNS propaganda on every Netguard or Invizible Pro thread on the internet.

That gives me a bad feeling, and it's the reason I started to consider RethinkDNS scummy.

lightdot 10/24/2024|||
Was the above post propaganda? Or was it just a user recommendation?

Perhaps the reason it gets mentioned often is simply because it's a good piece of software. Then again, perhaps not!

In any case, I'd be careful about using 3rd party DNS (and other) services, but that's for the user to decide, depending on the situation one is in.

Using one's own resolver is always a good practice, even in countries where ISPs are not selling customer's private data to anyone that comes along and where governments don't monitor and repress their citizens on every step...

We live in strange times where even EU countries misuse resolvers to censor certain web pages, while, for example, independent Balkan countries do not. Go figure...

thatloststudent 10/24/2024|||
I didn't intend for this to be propaganda, I don't even use it anymore since I'm on grapheneOS now. But I have tried all three. I need to use a VPN in split mode for certain apps, and since using Tor with apps wasn't part of my threat model, I ended up using RethinkDNS (the app only). I don't necessarily like their upstream DNS servers, but considering that I can use my own server (and do), I don't consider that to be an issue.
p0w3n3d 10/24/2024|||
especially that Wireguard silently disables NetGuard, and then the communication undergoes (at least in my case) silent
More comments...