ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

Router-based ad-blocking. Possible? Totally!

<< < (3/3)

If you don't have a firmware in your router that has JFFS capability, (eg. half of the shibby firmwares don't have the capability), then you can install adblock into the /tmp area of your routers flash RAM.

shibby Tomato builds

There's a downside to this, anything in /tmp is deleted when the router restarts ... but we can get around it  :)

Refer back to the images in my post as they're the same, the only difference is the paths used which I'll cover here:

Step 1) Log in to your routers web interface and go to, (under Tomato), Tools->System Commands.
Step 2) Paste the following lines into the Command text field.

--- Code: Text ---cd /tmpwget adblock.zipchmod +x *.sh ; chmod +x pixelserv./
Step 3) Click the Execute button.

After it's executed you should have a functioning router based adblocker which you can check by using the same test as in my post.

To get it to survive restarts we need to change the WAN Up script to the following:

As you can see, all that will happen is when the router makes a connection to the WAN is that it will download and install the adblock script again.

Everything else in my post, (Automatic Updates, Adblock Toggle), you can also do just remember to change the paths from /jffs/adblock/ to /tmp/

NOTE: At this point I should mention that you should download the file and host it somewhere so you're not relying on my VPS all the time.  Anywhere that can be accessed by the wget command in the router is fine, this means accessible by either HTTP or FTP protocols - not HTTPS, SFTP, or FTPS.
It will also allow you update the archive yourself with either a later adblock GitHub version or pixelserver version.

To update the adblock scripts/pixelserver:

If you're using /tmp
1) Update your archive.
2) Reboot your router.

If you're using /jffs
1) Update your archive.
2) Stop adblock, (via web interface or toggle).
3) Use these commands in the Tools->System Commands

--- Code: Text ---cd /jffs/adblockrm -f adblock.zipwget -o adblock.zipchmod +x *.sh ; chmod +x pixelserv./
Naturally, change the IP above to reflect wherever you have your copy of the file.


[0] Message Index

[*] Previous page

Go to full version