Neurophile
Occasional Visitor
As part of a round of beefing up the security of my network I decided to set up ipset/iptables to filter traffic from the darkest corners of the interwebs. I started with the Malware Filter script from the wiki here: https://github.com/RMerl/asuswrt-merlin/wiki/Using-ipset
Unfortunately, using 380.58 on an N66U this script is broken...so I fixed it and tweaked it to my needs. Here is the result.
First create the scripts (full code can be found on my github: https://github.com/Neurophile/ASUSWRT-scripts )
1) /jffs/scripts/firewall-start
2) /jffs/scripts/firewall-update
3) /jffs/scripts/services-start
set each one executable with, e.g.: chmod +x /jffs/scripts/firewall-start
Next create the list of blacklists that you want to use:
/jffs/filters/malware-filter.list
Mine is a very minimal set for now, more are listed in my master-blacklist-list or use your own favorites. Manually run the firewall-update script once to create and populate the IP blocklist cache file /jffs/filters/malware-filter.txt
You can now run firewall-start or reboot the router and your new blocklist will be blocking! The blacklist updates every night at 3 am via the cron job setup in the services-start script.
Enjoy!
Unfortunately, using 380.58 on an N66U this script is broken...so I fixed it and tweaked it to my needs. Here is the result.
First create the scripts (full code can be found on my github: https://github.com/Neurophile/ASUSWRT-scripts )
1) /jffs/scripts/firewall-start
2) /jffs/scripts/firewall-update
3) /jffs/scripts/services-start
set each one executable with, e.g.: chmod +x /jffs/scripts/firewall-start
Next create the list of blacklists that you want to use:
/jffs/filters/malware-filter.list
Mine is a very minimal set for now, more are listed in my master-blacklist-list or use your own favorites. Manually run the firewall-update script once to create and populate the IP blocklist cache file /jffs/filters/malware-filter.txt
You can now run firewall-start or reboot the router and your new blocklist will be blocking! The blacklist updates every night at 3 am via the cron job setup in the services-start script.
Enjoy!