Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE] AFWall+ v3.6.0 Duplicate Rules in Chain "afwall" Defined by Custom Script after Switching Interface #1366

Open
coldspring67 opened this issue Nov 29, 2023 · 1 comment
Labels

Comments

@coldspring67
Copy link

*** Issue ***
After switching the interface the rules in chain "afwall" from a custom script are duplicated.

*** Steps to reproduce the problem ***

  1. Clear custom script in AFWall+
  2. Wifi on and 4G off
  3. Define a custom script which adds one or more rules to chain "afwall":
    a) Define a rule directly (e.g. "IPTABLES=/system/bin/iptables; $IPTABLES -A "afwall" -d 22.22.22.0/21 -j REJECT") or
    b) Include a script with rules (e.g. ". /data/local/rules.sh")
  4. Wifi off
  5. 4G on -> the rules in chain "afwall" from custom script are there twice
  6. 4G off
  7. Wifi on -> the rules in chain "afwall" from custom script are there three times

*** Expected behaviour ***
The rules in chain "afwall" from custom script are there once even after switching interface, because:
"Please note that all those chains [afwall etc.] are guaranteed to be cleared before the custom script is executed, so you don't need to worry about rules cleanup on your script IF you are using those chains." (https://github.com/ukanth/afwall/wiki/CustomScripts#adding-custom-rules)

*** Hard- and software ***
Device: Samsung Galaxy S5 SM-G900F
Android OS: LineageOS v18.1 (Android 11)
AFWall+: v3.6.0 from F-Droid (profile mode: whitelist)
Superuser: Magisk v24.3

Please let me know, if further information is needed.

Thank you, ukanth for great work!

@Fry-kun
Copy link
Contributor

Fry-kun commented Dec 25, 2023

I'm seeing a similar behavior adding a rule to afwall-wifi chain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants