• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[APP][6.0+] NetGuard - No-root firewall

What are you mainly using NetGuard for?

  • Reducing data usage

    Votes: 447 30.8%
  • Saving battery

    Votes: 311 21.4%
  • Increasing privacy

    Votes: 794 54.8%
  • Blocking ads

    Votes: 935 64.5%

  • Total voters
    1,450
Search This thread

La_Globule

Senior Member
Nov 6, 2007
427
157
It is Android v11 on a Samsung Galaxy A51 5G.
And surprisingly, now I went back in my Wi-Fi area, get connected to the network and ad blocking is working now without any action on NG.
And besides, now, there are entries displayed in the NG log I left enabled.
 

M66B

Recognized Developer
Aug 1, 2010
25,098
52,524
It is Android v11 on a Samsung Galaxy A51 5G.
And surprisingly, now I went back in my Wi-Fi area, get connected to the network and ad blocking is working now without any action on NG.
And besides, now, there are entries displayed in the NG log I left enabled.
This looks like a routing bug in your Android version.
 

artician

Senior Member
Dec 29, 2015
50
5
I donated and grabbed the latest GitHub release of the project.
The SHA256, et all, on the Certification Fingerprint all came back mismatched.
Is there a build on GitHub that will match the signature hashes provided on the page?
For what it's worth, I tried to match the fingerprint on the cert, not the apk.
 

M66B

Recognized Developer
Aug 1, 2010
25,098
52,524
I donated and grabbed the latest GitHub release of the project.
The SHA256, et all, on the Certification Fingerprint all came back mismatched.
Is there a build on GitHub that will match the signature hashes provided on the page?
For what it's worth, I tried to match the fingerprint on the cert, not the apk.
The certificate fingerprint on the GitHub page is correct. I am pretty sure about that.
 
  • Like
Reactions: artician

artician

Senior Member
Dec 29, 2015
50
5
Hmm. Here is my SHA256 output via GPG4win:

Code:
Name: CERT.RSA
Size: 1112 bytes (1 KiB)
SHA256: 086D0B72BE063C99E6540BECF5C22728E2F5CCA7B896756187C18464454D8A29

And here is the SHA256 from the GitHub Page:
Code:
SHA256: E4:A2:60:A2:DC:E7:B7:AF:23:EE:91:9C:48:9E:15:FD:01:02:B9:3F:9E:7C:9D:82:B0:9C:0B:39:50:00:E4:D4

I am comparing with the NetGuard-v2.298-release, if that matters. Can you think of any mistakes I might have made?
 

M66B

Recognized Developer
Aug 1, 2010
25,098
52,524
Hmm. Here is my SHA256 output via GPG4win:

Code:
Name: CERT.RSA
Size: 1112 bytes (1 KiB)
SHA256: 086D0B72BE063C99E6540BECF5C22728E2F5CCA7B896756187C18464454D8A29

And here is the SHA256 from the GitHub Page:
Code:
SHA256: E4:A2:60:A2:DC:E7:B7:AF:23:EE:91:9C:48:9E:15:FD:01:02:B9:3F:9E:7C:9D:82:B0:9C:0B:39:50:00:E4:D4

I am comparing with the NetGuard-v2.298-release, if that matters. Can you think of any mistakes I might have made?
Please see here about how to check the fingerprint:

https://github.com/M66B/FairEmail/#user-content-downloads
 
  • Like
Reactions: artician

Phil3759

Inactive Recognized Developer
May 30, 2012
9,579
33,054
MIUI Android 11 on a Poco X3
There is a new bug after last system update. Filter Traffic no more filters adds in data (LTE), but only when connected to a wifi. Sic.

I guess the answer would be MIUI VPN is broken ?
 

Phil3759

Inactive Recognized Developer
May 30, 2012
9,579
33,054
MIUI Android 11 on a Poco X3
There is a new bug after last system update. Filter Traffic no more filters adds in data (LTE), but only when connected to a wifi. Sic.

I guess the answer would be MIUI VPN is broken ?
To answer my question: well no, just like the issue I reported about Google Drive
I just tested Blokada VPN free app and it works properly: Google Drive works without some tweakings like I mentioned, and ads filtering works for both Wifi and 4G data

Netguard still works on my Samsung S20 Android 11, but not on Xiaomi
I am a bit disappointed to see the support answers always blaming the OS without more debugging done

Disappointed to Switch from this donated app to a free app. But hey, I cannot live with ads while browsing !

Best regards and hope you continue to make efforts to fix and debug the issues reported
 

maybeme2

Senior Member
Aug 28, 2015
2,220
668
Google Pixel 5
I have an android game that has worked on my phone for years without ads simply because I use NetGuard firewall with the imported host file to block its internet access. Now, suddenly, that game app (which I have not updated) is suddenly full of noisy obtrusive ads.

I don't understand why. Did Google change something in its infrastructure that feeds ads to apps even if they are not connected to the internet? This is very annoying. I'm uninstalling this game app but would like to keep it if I can restore things to the way they were. I did restore an earlier backup from titanium backup but that did not remove the new ad behavior.

Where are the new ads coming from? Is there something else I can do?

Thanks.
 

M66B

Recognized Developer
Aug 1, 2010
25,098
52,524
To answer my question: well no, just like the issue I reported about Google Drive
I just tested Blokada VPN free app and it works properly: Google Drive works without some tweakings like I mentioned, and ads filtering works for both Wifi and 4G data

Netguard still works on my Samsung S20 Android 11, but not on Xiaomi
I am a bit disappointed to see the support answers always blaming the OS without more debugging done

Disappointed to Switch from this donated app to a free app. But hey, I cannot live with ads while browsing !

Best regards and hope you continue to make efforts to fix and debug the issues reported
Blokada works very differently from NetGuard and processes DNS requests only. It doesn't route traffic like NetGuard does.

Did you try to set two DNS server addresses in the advanced settings of the app?

It isn't about debugging time. I can't fix what I can't reproduce. If I wouldn't want to support the app anymore, I would tell.
 
  • Like
Reactions: Phil3759

M66B

Recognized Developer
Aug 1, 2010
25,098
52,524
I have an android game that has worked on my phone for years without ads simply because I use NetGuard firewall with the imported host file to block its internet access. Now, suddenly, that game app (which I have not updated) is suddenly full of noisy obtrusive ads.

I don't understand why. Did Google change something in its infrastructure that feeds ads to apps even if they are not connected to the internet? This is very annoying. I'm uninstalling this game app but would like to keep it if I can restore things to the way they were. I did restore an earlier backup from titanium backup but that did not remove the new ad behavior.

Where are the new ads coming from? Is there something else I can do?

Thanks.
Apparently, the app uses a domain name now that isn't in the hosts file.
 

maybeme2

Senior Member
Aug 28, 2015
2,220
668
Google Pixel 5
Apparently, the app uses a domain name now that isn't in the hosts file.
Actually I solved it.

NetGuard completely blocks the app from internet or data but these ads must be built in into the app itself. I always kept notifications disabled for this app in system settings. 'Somehow' (Google ghost?) changed the notifications settings to enabled. I again disabled notifications from this app and now it no longer shows ads. 😄

In case this helps someone else with a similar problem.
 

M66B

Recognized Developer
Aug 1, 2010
25,098
52,524
While doing a brief audit of the implementation, I noticed that the checksum of the gradle-wrapper.jar in the NetGuard GitHub doesn't seem to match any of the officially released gradle-wrapper.jar checksums. I followed the verification process from https://docs.gradle.org/current/userguide/gradle_wrapper.html#wrapper_checksum_verification.

Would it be possible to confirm my conclusion and if it doesn't match update the jar file?
The wrapper is as Android studio once installed it. It might be old. I will update it later.
 
  • Like
Reactions: [\]

Phil3759

Inactive Recognized Developer
May 30, 2012
9,579
33,054
Blokada works very differently from NetGuard and processes DNS requests only. It doesn't route traffic like NetGuard does.

Did you try to set two DNS server addresses in the advanced settings of the app?

It isn't about debugging time. I can't fix what I can't reproduce. If I wouldn't want to support the app anymore, I would tell.

Ok, sorry for the comparison, I was not aware the Blokada was only routing dns requests
It is a bit limiting in my case as I need my internal dns resolver for LAN access to some servers. Well it has some workarounds but none 100% satisfactory for me on Android 11 (reading SSIDs is drastically limited now)


Did you try to set two DNS server addresses in the advanced settings of the app?

I never edited the DNS options there
I just tried it now and it doesn't fix the issue. Traffic is not filtered in data mode, even apps get not blocked at all when set to block data in NetGuard on the Xiaomi Android 11 device. Using OpenVPN connect, I see that data traffic is properly routed through my personal VPN server. It seems so that OpenVPN connect is properly routing my Wifi and Data traffic through the VPN, but not in Netguard !

Another issue I noticed on the second device, Samsung Galaxy S20 since Android 11 update too: randomly, all internet traffic is blocked and I need to restart the Netguard VPN service (toggle on-off the in app switch)

On two other old Android devices (Android 6, 7 and 8), there are no issues. It was also properly working on Android 10 for the Samsung Galaxy S20 and the Xiaomi Poco X3
 

M66B

Recognized Developer
Aug 1, 2010
25,098
52,524
Ok, sorry for the comparison, I was not aware the Blokada was only routing dns requests
It is a bit limiting in my case as I need my internal dns resolver for LAN access to some servers. Well it has some workarounds but none 100% satisfactory for me on Android 11 (reading SSIDs is drastically limited now)




I never edited the DNS options there
I just tried it now and it doesn't fix the issue. Traffic is not filtered in data mode, even apps get not blocked at all when set to block data in NetGuard on the Xiaomi Android 11 device. Using OpenVPN connect, I see that data traffic is properly routed through my personal VPN server. It seems so that OpenVPN connect is properly routing my Wifi and Data traffic through the VPN, but not in Netguard !

Another issue I noticed on the second device, Samsung Galaxy S20 since Android 11 update too: randomly, all internet traffic is blocked and I need to restart the Netguard VPN service (toggle on-off the in app switch)

On two other old Android devices (Android 6, 7 and 8), there are no issues. It was also properly working on Android 10 for the Samsung Galaxy S20 and the Xiaomi Poco X3
If subnet routing is enabled, try to disable it.

Are battery optimizations disabled for the app?
 
  • Like
Reactions: Phil3759

topcaser

Senior Member
Dec 17, 2005
810
92
How is this possible? I denied an access but it's green.

Screenshot_2021-10-23-20-43-19-56_bf2abc62d66fd25982f3e5d9aacf0728.jpg
 

Top Liked Posts

  • 2
    Hi Marcel,

    I understand that NetGuard is no more available on GitHub but on Bitbucket.

    Is this new version 2.300 a stable or beta version ? It's not indicated when trying downloading it.
    The Bitbucket version is a preview version. It will be made available on GitHub later.
  • 6
    Version 2.300 is available on Bitbucket now.

    Download:
    https://bitbucket.org/M66B/netguard-test/downloads/NetGuard-v2.300-release.apk

    There will be no update notification for this preview release.

    Changelog:
    • Improved Android 12 compatibility
    • Removed subscriptions (due to new Play store policies)
    • Updated builds tools and translations
    All changes:

    https://github.com/M66B/NetGuard/compare/2.299...2.300?w=1
    2
    Hi Marcel,

    I understand that NetGuard is no more available on GitHub but on Bitbucket.

    Is this new version 2.300 a stable or beta version ? It's not indicated when trying downloading it.
    The Bitbucket version is a preview version. It will be made available on GitHub later.
    2
    Hi there,

    first of all a big thanks @M66B for Netguard. I almost immediately bought the premium version after I got my new phone and decided to try going root-less and replace AfWall+ with it for a while. And from what I can tell it runs perfectly fine since some months :)

    I really love the integrated ad-blocking feature and let Tasker update my blocklist via service intent. In that way, Netguard both replaces AfWall+ and my VPN to my Pi-Hole at home with only minimal restrictions (not being able to access my Shaarli instance at home for example if I am away), since the Wireguard app sadly does not support Socks5 :rolleyes:.

    I have one question though which I could not find in the app FAQ or in this thread: Is it also possible to append a local hosts file via a second service intent or shell command after the main hosts file has been updated?
    1
    Hi,
    NetGuard does not request access rights for storing data thus I can't grant permission. This is the same for all of my devices and it is working on the others.
    Is there some sort of if-then condition to enable or disable those buttons?
    Please read the res of the referenced FAQ too and skip the part of the storage permissions.

    The FAQ is for FairEmail, but the problem is similar.
    1
    Any chance for a root-version of NetGuard to get it working without VPN?
    Perhaps as Magisk module or donation-feature?


    Short notice: As I was looking for a firewall app I also found this one.
    It is using your app description. Perhaps just the description or also your codebase with different interface ui.
    I have no plans for a root version, sorry.

    The referenced app is most likely based on the code of NetGuard, without permissions ...
  • 348
    ic_launcher.png


    NetGuard provides simple and advanced ways to block access to the internet - no root required.
    Applications and addresses can individually be allowed or denied access to your Wi-Fi and/or mobile connection.

    Blocking access to the internet can help:
    • reduce your data usage
    • save your battery
    • increase your privacy

    Features:
    • Simple to use
    • No root required
    • 100% open source
    • No calling home
    • No tracking or analytics
    • No advertisements
    • Actively developed and supported
    • Android 5.1 and later supported
    • IPv4/IPv6 TCP/UDP supported
    • Tethering supported
    • Optionally allow when screen on
    • Optionally block when roaming
    • Optionally block system applications
    • Optionally forward ports, also to external addresses (not available if installed from the Play store)
    • Optionally notify when an application accesses the internet
    • Optionally record network usage per application per address
    • Optionally block ads using a hosts file (not available if installed from the Play store)
    • Material design theme with light and dark theme

    PRO features
    • Log all outgoing traffic; search and filter access attempts; export PCAP files to analyze traffic
    • Allow/block individual addresses per application
    • New application notifications; configure NetGuard directly from the notification
    • Display network speed graph in a status bar notification
    • Select from five additional themes in both light and dark version

    There is no other no-root firewall, except for clones, offering all these features.

    This XDA thread is about using the latest version of NetGuard.
    Off topic comments are allowed as long they are related to NetGuard and are in the general interest of the followers of this thread.

    Discussion of purchases is not allowed here, please contact me via here instead.

    NetGuard is being maintained and supported, but new features won't be added anymore.

    For ad blocking, see here. Ad blocking is provide "as-is".

    More information on Github:

    Downloads:

    Screenshots:
    101-main.png
    102-main-details.png

    103-main-access.png
    108-notifications.png


    For more screenshots, see here.






    XDA:DevDB Information
    NetGuard, App for all devices (see above for details)

    Contributors
    M66B
    Source Code: https://github.com/M66B/NetGuard/


    Version Information
    Status: Stable

    Created 2015-10-25
    Last Updated 2020-03-11
    25
    25
    I have just released stable version 2.39.

    Changelog/download
    https://github.com/M66B/NetGuard/releases/tag/2.39

    This version will be available in the Play store after Google's approval.

    Usage data sharing has been removed from this version.

    The future of this project depends on the general support for this project. You can for example write something positive here or in the Play store, press the thanks button, donate something, purchase a pro feature or contribute translations or source code.
    17
    I have just released beta version 2.268

    Changelog/download:
    https://github.com/M66B/NetGuard/releases

    This version adds a setting for a domain name to use to validate the internet connection. The default is www.google.com. You could for example change this into www.opendns.com.
    17
    I have just released beta version 2.21.

    Changelog/download:
    https://github.com/M66B/NetGuard/releases/tag/2.21

    This version will be available as beta version in the Play store after Google's approval.