Simple script for generating ASN Block lists and DNS Server entry for Android AFWall.
It generates AFWall scripts for blocking connections to google, facebook, whatever you want. This gets achieved through setting the corressponding iptables rules.
Following Packages are required to fetch and set the corressponding rules:
Awk, printf, wget
Open a terminal window
git clone https://github.com/mglinux/afwall_easy.git
cd afwall_easy
Make the script executable with "chmod +x afwall.sh"
Run the script with ./afwall.sh
Set the DNS proxy to -Disable DNS via netd- (preferences->Binaries->DNS proxy) You must allow (Android 5+) -[0] (root) - Apps running as root- in afwall else dns resolving won´t work!
Since there isn't an update function yet, the script should be run regularly (e.g monthly) to fetch New ASNs for each company you wish to block. But well this happens not that often.
Thx ukanth, Mike and maloe for the amazing work! 👍
License: AFWall and ASN_IPFire_Script are under GPLv3. Afwall_easy script itself has none. Feel free to use any piece of the script itself!