OpenWrt Forum Archive

Topic: ALL-U-NEED Ad Blocking by YAQUI - Does it work with OpenWRT

The content of this topic has been archived between 22 Apr 2018 and 30 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I made a modification of this script, seems working on openwrt but not really tested. You can find it here:
http://pastebin.com/c6BYxk9q

edit: this is the modification of script I used on tomato

(Last edited by xclusiv on 25 Aug 2011, 13:36)

Assuming your router has ~500K free, you the following script should work fine.  The script has been tweaked but originally comes from the DDWRT wiki page.  It's easily understood and works on my router (WRT54GL) just fine.  The script will download each boot and could easily be added to cron if wanted.

On your router choose "Network | DHCP and DNS | Resolv and Host Files"  Then plug in "/tmp/dlhosts" without quotes under Additional Host Files.

Then go to "System | Startup" and paste the following into the script somewhere before the "exit 0"

echo -e "echo \"Waiting for device\"\nsleep 60\nwget -q -O - http://www.mvps.org/winhelp2002/hosts.txt | grep "^127.0.0.1" | grep -v localhost | awk '{print \"0.0.0.0\t\" \$2}' > /tmp/dlhosts\nkillall -HUP dnsmasq" > /tmp/write_dlhosts
chmod +x /tmp/write_dlhosts
/tmp/write_dlhosts &

Reboot your router and give it around a minute.  You should be ad free.

Is there a final walkthrough for this? And could I please get the binaries for pixelserv on AR71XX?

I really would appriciate a final walkthrough for adblocking with openwrt on routerlevel. Is the script of LinuxNewb working with AA?

Edit:
Here is what I did and this is working instantly.
I downloaded http://winhelp2002.mvps.org/hosts.zip, extracted it and copied the file to /etc/hosts (overwrote it).
Now when I start my router it instantly loads the hosts file.

(Last edited by stonecarver on 3 Dec 2012, 13:17)

The discussion might have continued from here.