[5.0+][ROOT][3.6.0] AFWall+ IPTables Firewall [28 AUG 2023]

Search This thread

temporarium

Senior Member
It's possible to arrange for two apps to share the same Linux user ID, in which case they are able to access each other's files. To conserve system resources, apps with the same user ID can also arrange to run in the same Linux process and share the same VM. The apps must also be signed with the same certificate

So, how can/does AFWall+ protect against this?
 
  • Like
Reactions: n0j0e

PoochyX

Senior Member
Oct 23, 2016
2,170
425
I am an *extreme* debloater—I recently totally locked up my Tab S5e by messing with Samsung Payment/kgclient and had to go back to stock and start all over again—my nic stands for Tweak it Til it Breaks, after all. I am also, at heart, a minimalist, and strive to rid my devices of *everything* that is, imo, non-essential.

Privacy intruding apps/ops are my first targets and am willing to suffer crashes/lockups to see how much I can disable/delete/deactivate, et al. Four of my favorite tools are 3C Toolbox Pro, MyAndroidTools, App Ops by Xingchen & Rikk, and, of course, AFWall+.
3C Toolbox has a fire wall in it tho

([emoji3590]09-09-18[emoji813])
 

mark_at

Senior Member
Feb 25, 2018
311
98
Innsbruck
I am an *extreme* debloater—I recently totally locked up my Tab S5e by messing with Samsung Payment/kgclient and had to go back to stock and start all over again—my nic stands for Tweak it Til it Breaks, after all. I am also, at heart, a minimalist, and strive to rid my devices of *everything* that is, imo, non-essential.

Privacy intruding apps/ops are my first targets and am willing to suffer crashes/lockups to see how much I can disable/delete/deactivate, et al. Four of my favorite tools are 3C Toolbox Pro, MyAndroidTools, App Ops by Xingchen & Rikk, and, of course, AFWall+.

Why not XPrivacyLua?
Think is more powerful than AppOps, no?
 
  • Like
Reactions: ydd0ras

HonkderZonk

New member
Jul 27, 2019
1
0
Problems with AFWall+ split apks

First of all, thanks for the APP, it's really good :)

I have a small problem, some APPs are blocked but not displayed, so I can't configure / unblock them.

Enclosed is the config and an exact error description. If anyone has a good tip I would be grateful :highfive:

OnePlus 6 with microg Lineage 16 latest version
Yalp store
SAI Split APKs Installer

The Yalp store downloads some APPs only as Split APKs, which I can only install via detours (e.g. SAI).

These APPs are blocked by AFWall+, but not displayed in the config menu :(
The blocked apps are displayed in the logs.

Since I also use Shelter I have activated the Multiuser Mode as well as the Dual Apps Support.
 
Last edited:

topaza

Senior Member
Aug 12, 2009
167
19
Hi,

first let me use this post to thank the developer for for this great App! I also will send a donation soon!

Can someone tell me how the Log Setting "show hostname" in AFWall+ works and if it is worth installing the proprietary unlock-apk?
It would be nice to see what FQDN the Apps contact but does it work well?
Does AFWall+ Capture the actual DNS Requests of the Apps?
Or is it just a DNS PTR Reverse-Lookup?
 

darfri

Senior Member
Nov 13, 2008
936
64
OnePlus 6T
Hello. I would like to have a magisk module access my local net. Allowing "running as root" is too broad. Even allowing everything to a certain ip(+port!) would be good. Custom script?
 

dope77

Senior Member
Aug 8, 2018
401
125
I have nordvpn running on my android 9 with vpn control Enabled in afwall(3.2.0), connections are just fine everywhere except on google play, keeps telling me there's no connection eventhough it's allowed to communicate over VPN. Any ideas?
 

mocarela

Senior Member
Jul 16, 2012
57
14
custom scripts timeout

I'm wondering if there is any timeout implemented for execution of custom scripts?
Because on my older phone, that is considerable slower, AFWall+ throws an error at the end of the second one, but I have three.
If it is, could the developer increase this timeout or even better make an option to allow the user to configure it himself, please?
 

TiTiB

Senior Member
Jun 19, 2015
926
743
Earth, for now
Anyone having this issue on every reboot?

Code:
android.app.RemoteServiceException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{e572d61 u0 dev.ukanth.ufirewall/.service.LogService}
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1883)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loop(Looper.java:214)
	at android.app.ActivityThread.main(ActivityThread.java:7075)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)

Started a few days ago, after months of error-free use.

Samsung Galaxy Tab S5e (SM-T720)
Android 9
Magisk 19.3 Manager 7.3.2
Riru - EdXposed v0.4.5.1_beta (4463) (YAHFA)
AFWall+ 3.2.0 beta
 

silkyriver

Member
May 27, 2013
23
2
Anyone having this issue on every reboot?

When you get these errors, is AFWall+ not starting properly at boot time? If so I'm seeing similar issues where it's not starting properly during at boot and blocked apps are gaining access during this time. I can't check the logs atm but I might see if I'm also getting similar errors later...Pretty much the same setup as you software wise, but phone is a Xiaomi Mi Mix 2S.
 
  • Like
Reactions: TiTiB

TiTiB

Senior Member
Jun 19, 2015
926
743
Earth, for now
When you get these errors, is AFWall+ not starting properly at boot time? If so I'm seeing similar issues where it's not starting properly during at boot and blocked apps are gaining access during this time. I can't check the logs atm but I might see if I'm also getting similar errors later...Pretty much the same setup as you software wise, but phone is a Xiaomi Mi Mix 2S.
It still blocks apps and otherwise performs normally. Hadn't thought about it leaking data at boot...gotta look in to this. Trying out boot scripts to grab first minute or so of log.
 

topaza

Senior Member
Aug 12, 2009
167
19
I have some questions regarding IPv6.
I would prefer to disable IPv6 on my phone completely but this does not seem to work reliable as the system settings in /proc/sys/net/ipv6/ are changed in the background while wifi is enabled/disabled etc.
So at least I want to make sure that all my app policies also apply to IPv6 and that there is no IPv6 Traffic allowed for apps, which are supposed to be denied internet access.

I am not sure about the meaning of some options/settings:
1) "ipv6 support"
1.1) "disabled" means that AFWall+ ignores any IPv6 traffic and denied apps can bypass the ipv4 policy by using ipv6? Or does afwall+ block any ipv6 traffic in that case?
1.2) "enabled" means that AFWall+ Applies the same policies to ipv6 traffic as tp ipv4 traffic?
2) "only control IPv6 Chains" What does this setting do? What is the difference to enabling "ipv6 support"?
3) I am also wondering that the AFWall+ log only displays blocked ipv4 addresses and no ipv6 addresse at all. (no matter if "ipv6 support" is enabled or disabled) Is IPv6 traffic not logged or does it bypass afwall+?
 
Last edited:
  • Like
Reactions: Vpr2k1
Jun 3, 2018
45
12
lawrence
:
1) "ipv6 support"
1.1) "disabled" means that AFWall+ ignores any IPv6 traffic and denied apps can bypass the ipv4 policy by using ipv6? Or does afwall+ block any ipv6 traffic in that case?
1.2) "enabled" means that AFWall+ Applies the same policies to ipv6 traffic as tp ipv4 traffic?
2) "only control IPv6 Chains" What does this setting do? What is the difference to enabling "ipv6 support"?
3) I am also wondering that the AFWall+ log only displays blocked ipv4 addresses and no ipv6 addresse at all. (no matter if "ipv6 support" is enabled or disabled) Is IPv6 traffic not logged or does it bypass afwall+?

First off check of you are using ipv6 with your 4g provider and WiFi connection.
AFAIK (checked against iptables and ip6tables)
1) should turn on ipv6 rules I do not see a diffrence in the command line
2) this changes the default settings for the firewall chain like the ipv4 settings above in the setting panel
3) sorry I use free version (should switch to the paid just lazy)

If I can make a request that the firewall can change profiles based on a app in other words if you have a banking profile when you turn on your banking app afwall will switch to the appropriate profile (checking the uid for usage)
 

topaza

Senior Member
Aug 12, 2009
167
19
I have some questions regarding IPv6.
I would prefer to disable IPv6 on my phone completely but this does not seem to work reliable as the system settings in /proc/sys/net/ipv6/ are changed in the background while wifi is enabled/disabled etc.
So at least I want to make sure that all my app policies also apply to IPv6 and that there is no IPv6 Traffic allowed for apps, which are supposed to be denied internet access.

I am not sure about the meaning of some options/settings:
1) "ipv6 support"
1.1) "disabled" means that AFWall+ ignores any IPv6 traffic and denied apps can bypass the ipv4 policy by using ipv6? Or does afwall+ block any ipv6 traffic in that case?
1.2) "enabled" means that AFWall+ Applies the same policies to ipv6 traffic as tp ipv4 traffic?
2) "only control IPv6 Chains" What does this setting do? What is the difference to enabling "ipv6 support"?
3) I am also wondering that the AFWall+ log only displays blocked ipv4 addresses and no ipv6 addresse at all. (no matter if "ipv6 support" is enabled or disabled) Is IPv6 traffic not logged or does it bypass afwall+?

I did some more testing and am still confused about these IPv6 settings...

With IPv6 support disabled I had trouble with CalDAV and CardDAV synchronization. I also could see AppID 1000 being blocked regularly in AFWall+ Logs.
With IPv6 support enabled, CalDAV and CardDAV synchronization suddenly worked without any issue. I also could not see AppID 1000 being blocked anymore.
So it feels like enabling IPv6 supports allows some traffic to invisibly bypass the firewall.

Maybe @ukanth can clarify how IPv6 support is supposed to work?
 
  • Like
Reactions: Vpr2k1 and TiTiB

Top Liked Posts

  • 1
    What is needed to be enabled to use Android Auto in my car?
    I'm not sure what you're asking, but AFWall is meant to block traffic based on certain rules. Why would you want to use AFWall in order to enable AA? Are you rooted? Custom ROM? What's your environment? Are you currently able to use AA in your car?
    1
    I'm not sure what you're asking, but AFWall is meant to block traffic based on certain rules. Why would you want to use AFWall in order to enable AA? Are you rooted? Custom ROM? What's your environment? Are you currently able to use AA in your car?

    Perhaps they are having trouble using Android auto with the Firewall, e.g., maybe AFwall is blocking Android Auto.

    +1 to your question/suggestion about whether or not Android Auto works okay when AFwall is not enabled.
    1
    What is needed to be enabled to use Android Auto in my car?
    this sounds like you are using afwall in whitelist mode (blocks everything, and you select what gets access)?

    if you run it in the recommended blacklist mode (allows everything, and you select what gets blocked) you should not have this issue - assuming you don't of course block android auto or some crucial system app.
    1
    What is needed to be enabled to use Android Auto in my car?
    I had to enable traffic for a bunch of XIAOMI system "apps" (they bundle a bunch of apps together so that you don't disable them) that disabled network if they didn't phone home successfully after a couple of minutes. Never buying anything from that underhanded manufacturer EVER AGAIN.
    1
    What is needed to be enabled to use Android Auto in my car?
    What device you are using? OS and app version? What the default filtering mode? There's any logs while your device try to attempt any connection? More info please.
  • 1
    What is needed to be enabled to use Android Auto in my car?
    I'm not sure what you're asking, but AFWall is meant to block traffic based on certain rules. Why would you want to use AFWall in order to enable AA? Are you rooted? Custom ROM? What's your environment? Are you currently able to use AA in your car?
    1
    I'm not sure what you're asking, but AFWall is meant to block traffic based on certain rules. Why would you want to use AFWall in order to enable AA? Are you rooted? Custom ROM? What's your environment? Are you currently able to use AA in your car?

    Perhaps they are having trouble using Android auto with the Firewall, e.g., maybe AFwall is blocking Android Auto.

    +1 to your question/suggestion about whether or not Android Auto works okay when AFwall is not enabled.
    1
    What is needed to be enabled to use Android Auto in my car?
    this sounds like you are using afwall in whitelist mode (blocks everything, and you select what gets access)?

    if you run it in the recommended blacklist mode (allows everything, and you select what gets blocked) you should not have this issue - assuming you don't of course block android auto or some crucial system app.
    1
    What is needed to be enabled to use Android Auto in my car?
    I had to enable traffic for a bunch of XIAOMI system "apps" (they bundle a bunch of apps together so that you don't disable them) that disabled network if they didn't phone home successfully after a couple of minutes. Never buying anything from that underhanded manufacturer EVER AGAIN.
    1
    What is needed to be enabled to use Android Auto in my car?
    What device you are using? OS and app version? What the default filtering mode? There's any logs while your device try to attempt any connection? More info please.
  • 404
    Welcome to official support page for AFWall+

    Disclaimer - As Usual. I'll not take any responsible if something goes wrong when using AFWall+

    Introduction
    AFWall+ is an improved version of DroidWall(front-end application for the powerful iptables Linux firewall). It allows you to restrict which applications are permitted to access your data networks (2G/3G/4G/LTE and/or Wi-Fi and while in roaming).Since the original author of Droidwall
    discontinued the project, I decided to keep the app instead of Avast Firewall. I'll continue to add more features as I can.


    Features
    - Supports 5.x to 13.x
    - Import/Export Rules to external storage
    - Search Applications
    - Multiple Profiles with custom names
    - Tasker/Locale support
    - Select All/None/Invert/Clear applications with single click
    - Revamped Rules/Logs Viewer with copy/export to external storage
    - Ability to view the network interfaces
    - Highlight system applications with custom color
    - Notify on new installations
    - Ability to hide application icons( faster loading )
    - Use LockPattern for application protection.
    - Show/Hide application ID.
    - Roaming Control for 3G/Edge
    - VPN Control
    - LAN Control
    - Tether Control
    - IPV6 Control
    - Tor Control
    - Choose able languages
    - Choose able iptables/busybox binary
    - Supports MIPS/x86/ARM
    - DNS Hostname

    Changelog - See third Post
    Current Version - 3.6.0

    To get Unlocker without Google services - Please follow the instructions here

    AFWall+ BETA Program
    1) AFWall+ opt-in for beta program
    2) Install AFWall+ and If you have any issues, just send email from (Menu -> Firewall Rules - > Send error report)

    Source Code/Wiki/FAQ
    AFWall+ is an free & opensource application
    Github
    Log an issue
    Frequently Asked Questions
    Many Thanks to @CHEF-KOCH

    Translations
    Translations - Please help me with translations in your language.
    http://crowdin.net/project/afwall

    Thanks To/Credits
    - German translations by chef@xda & user_99@xda & Gronkdalonka@xda
    - French translations by GermainZ@xda & Looki75@xda
    - Russian translations by Kirhe@xda & YaroslavKa78
    - Spanish translations by spezzino@crowdin
    - Dutch translations by DutchWaG@crowdin
    - Japanese translation by nnnn@crowdin
    - Ukrainian translation by andriykopanytsia@crowdin
    - Slovenian translation by bunga bunga@crowdin
    - Chinese Simplified translation by tianchaoren@crowdin
    - Polish translations by tst,Piotr Kowalski@crowdin
    - Swedish translations by CreepyLinguist@crowdin
    - Greek Translations by mpqo@crowdin
    - Portuguese translations by lemor2008@xda
    - Chinese Traditional by shiuan@crowdin
    - Chinese Simplified by wuwufei,tianchaoren @ crowdin
    - Italian translations by benzo@crowdin
    - Romanian tranlations by mysterys3by-facebook@crowdin
    - Czech translations by Syk3s

    Cheers,
    ukanth

    XDA:DevDB Information
    AFWall+ [ IPTables Firewall ], App for the Android General

    Contributors
    ukanth
    Source Code: https://github.com/ukanth/afwall


    Version Information
    Status:
    Stable
    Current Stable Version: 3.5.3
    Stable Release Date: 2022-06-28
    Current Beta Version:
    3.5.3
    Beta Release Date: 2022-06-28

    Created 2013-12-03
    Last Updated 2020-09-05
    70
    Version 3.0.1

    * Fix: Status toggle widget 1x1
    * Fix: Ability to hide ongoing notification (Stop firewall and restart to hide after disable it in preferences)
    * Fix: Firewall error notification on oreo and above
    * Security: Tile toggle checks for password
    * User reported crashes
    * Updated translations

    Previous version 3.0.0

    Features:
    * Better support for nougat/oreo and pie.
    * Firewall toggle tile
    * Adaptive Icons
    * Notification channels
    * Tor support

    Bugs:
    * General bug fixes and crash reports.
    * Language selection bug
    * Filter selection bug
    * Compatible with magisk 17.x
    * Better handling of background process
    * Drops support for 4.x devices
    * Update languages
    * Updated libraries

    Complete Changelog

    41
    Hello All,

    After careful analysis and testing, I decided not to rewrite the way rules are being applied due to lot of under hood changes required. Instead added few enhancements. Now applying rules from menu will show how many rules are getting applied with progress status. Also when adding/removing few rules , it will apply only those related rules instead of full apply.

    Also fixed couple of bugs and enhancements. You can get the full changelog from https://github.com/ukanth/afwall/blob/beta/Changelog.md

    This is BETA Version which is not released on playstore. I have been using this for past week and it's stable. But there might be bugs which I haven't encountered. Please test it and report it in case of any issues.

    Also I have been following XPrivacy thread on the decision by it's author. Just as FYI, I might fix it for my own usage when I update to nougat, I will share it here if anybody uses it here.

    BETA Link - https://www.dropbox.com/s/isvi413qyx6vb4d/AFWall+ 2.9.7-BETA-TESTER.apk?dl=0
    40
    Hello everyone,

    I have released 3.0.0 stable on playstore today. It's been a crazy month so far. After going through lot of dilemma of whether to support the existing afwall or write a new one from scratch, finally able to pull myself and release stable version of afwall with lots of bug fixes and new features along with pie support. Since I don't do full time Android development, it was hard to keep track of what's going on with sdk level changes.

    Thank you all for your support in AFWall+ development. Without your support it would simply not possible to pull through this.

    I will be out for couple of days ( taking off to spend time with my family ) and hopefully will be able to reply to questions once back.

    Thanks again and have a great day.
    35
    Hello everyone,

    I have released stable version of 3.1.0 to playstore and github. Its live on playstore. You can find the changelog along with md5/sha here

    https://github.com/ukanth/afwall/releases/tag/v3.1.0

    Thank you all for your continuous support in AFWall+ development.