Install OpenWRT on your router. The link above is for a decently fast router that comes with OpenWRT installed.
Now install Adguard Home on the OpenWRT router so you can use DNS block lists to stop/block spamware/scamware
Network-wide ads & trackers blocking DNS server. Contribute to AdguardTeam/AdGuardHome development by creating an account on GitHub.
github.com
NOTE: Adguard Home and OpenWRT are open source and free.
Next, BLOCK all ipv6 network traffic on your LAN/WiFi. The reason for blocking ipv6 is to force all network traffic to use your OpenWRT router as the DNS server. If you don’t do this step then many newer networked devices running ipv6 will cheerfully bypass your firewall and DNS server settings because IPv6 will want to configure every device as a IPv6 server/relay. IPv6 is sneaky and assumes that everything on your firewalled LAN should have direct internet access and be controlled by scammers and spammers.
Warning - using this method isn’t hands free and you can and probably will break many websites and services that rely on spamware/scamware to work aka goggle, fakebook, amazone. On the plus side all the devices on your network will suddenly seem much faster because 60% of your network traffic going to scammers and spammers trying to track and manipulate you will disappear.
Makes sure to purge all your devices caches to block old connections from reusing old data.