This is the ASN script by Mike Kuketz and maloe. It is used to block the IP address spaces of Google and other companies. Originally it was developed for IPFire. However, it also works with AFWall and iptables.
I also have a modified version for macOS pf if anyone needs it.
It’s a shame because I think in principle root should not be required. My unrooted device uses Netguard and Orbot to force traffic to be routed over Tor. A pro version of Netguard could support filtering at the firewall. Or alternatively, Orbot supports an outbound proxy. So I wonder if a Google-blocking proxy could run without root and Orbot could channel the traffic through it.