• 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: 440 30.6%
  • Saving battery

    Votes: 308 21.4%
  • Increasing privacy

    Votes: 786 54.7%
  • Blocking ads

    Votes: 929 64.6%

  • Total voters
    1,438
Search This thread

La_Globule

Senior Member
Nov 6, 2007
417
154
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
24,880
51,704
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
24,880
51,704
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
24,880
51,704
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,577
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,577
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,212
667
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
24,880
51,704
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
24,880
51,704
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,212
667
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
24,880
51,704
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,577
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
24,880
51,704
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
801
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

  • There are no posts matching your filters.
  • 6
    Version 2.299 beta is available on GitHub now and in the Play store test program after Google's approval.

    Changelog/download:
    https://github.com/M66B/NetGuard/releases
    2
    My motivation to work on this project has decreased to almost zero after a recent wave of 1 star Play store reviews. Mostly stupid reviews, like why does this app need internet?

    Literally millions of people use NetGuard but people seem only to review to complain about something, which is pretty tiresome. The project is not there to earn money, so what's left?
    Marcel, you are The Great Developer so you don't need to read these stupid 1 star ratings. Stay cool ;-) Kind regards, Lukas
    2
    App rule :
    Blocking or allowing an app.
    Made by blocking or allowing Wi-Fi or Mobile data for an app ?

    Connection rule :
    Blocking or allowing a connection of an app.
    a) Made by blocking or allowing an IP address for an app ?
    or
    b) Made by blocking or allowing a domain name with the hosts file for an app ?
    If yes, is there a precedence between a and b ?

    Am I right ?
    I hope having understood your reply. Sorry in advance if I try to clarify my understanding but I thing that it can help other people.
    Yes and yes. Ad blocking is system wide and therefore takes precedence over everything else.
    2
    @pardub Imagine that lots of people say everyday to you that your work is bad and almost nobody says it is good. How would you react?
    Who cares what these people say! They wouldn't know where to start and are either stupid or intentionally malignant.

    Besides, I think your app protects the privacy of those who use it. That is its beneficial effect on those who use it. What idiots write about it may be hurtful but it is not what's important. I'm sure you developed this superb app because it protects privacy not because you wanted to gather compliments. So what idiots write about it is really secondary.

    Your app is much needed and does its job very well. You know that. Its users know that. That some idiots (and they are idiots or malicious) try to bring it down is in the end just background noise.

    Thank you for all your efforts.
    2
    To be honest,I wouldn’t really take in consideration what people think about me if I was developing an app.

    In the same time, I would always take in consideration the constructive criticisms as they would help me to develop a better app .

    For those who couldn’t appreciate the real value of my work and have no clue about the time and dedication provided to build this app, well though….

    I have to acknowledge I cannot make everyone happy and getting totally unjustified bad reviews by some people is the unavoidable downside when you published something online.

    A developer can provide guidance about how to use his app but he cannot educate people.

    But I totally agree unjustified criticisms are not a pleasant thing and it doesn’t show any consideration for the work provided but we cannot control what people said.

    Time and efforts should only be dedicated to people who appreciate my work, not the others.
    Which could also mean that time is better spent on other things.

    For now I will keep maintaining and supporting the app, which means that bugs will be fixed and that the app will be adapted for new Android versions. There won't be new features anymore though.
  • 347
    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.