How to block scanners, bots, malware, ransomware - RMerl/asuswrt-merlin.ng GitHub Wiki
Here is a minimalist script that uses ipset lists on the routers firewall to block scanners, bots, malware, ransomware, brute force crackers, bogon IPs, hacked IPs, hostile spiders, etc, (much over 650 million unique sources) from the published tiers Level1 through Level4 maintained by Cybercrime IP Feeds by FireHOL
The script is located here
The snbforums thread to discuss the script is here
Features, installation instructions, scheduling, whitelisting and other information is detailed in the first post on that forum thread.