I found a simple script that wasn't working at first but after I made my own adjustments this works fine on the Asus Merlin builds with Entware installed.
This uses dnsmasq to block ads and automatically updates every day at 6AM.
Install Entware
https://github.com/RMerl/asuswrt-merlin/wiki/Entware
Add the following lines to /jffs/scripts/services-start
Create the following file /jffs/scripts/updateadblock.sh
Make the /jffs/scripts/updateadblock.sh executable
chmod +x /jffs/scripts/updateadblock.sh
Reboot the router
This uses dnsmasq to block ads and automatically updates every day at 6AM.
Install Entware
https://github.com/RMerl/asuswrt-merlin/wiki/Entware
Add the following lines to /jffs/scripts/services-start
Code:
wget "http://pgl.yoyo.org/adservers/serverlist.php?hostformat=dnsmasq&showintro=0&mimetype=plaintext" -O "/tmp/dnsmasq.adblock.conf"
echo "conf-file=/tmp/dnsmasq.adblock.conf" >> /etc/dnsmasq.conf
killall dnsmasq
sleep 3
dnsmasq -c 1500 --log-async -n
(crontab -l ; echo "0 6 * * * """/jffs/scripts/updateadblock.sh"") |crontab -
killall crond
crond
Create the following file /jffs/scripts/updateadblock.sh
Code:
wget "http://pgl.yoyo.org/adservers/serverlist.php?hostformat=dnsmasq&showintro=0&mimetype=plaintext" -O /tmp/dnsmasq.adblock.conf
killall dnsmasq
sleep 3
dnsmasq -c 1500 --log-async -n
Make the /jffs/scripts/updateadblock.sh executable
chmod +x /jffs/scripts/updateadblock.sh
Reboot the router
Last edited: