Install adblock on an OpenWRT router

Many people will use a browser extension to try to block adverts on some webpages, but it can take a while if you have quite a few machines to configure. There is another way, which is to have your router handle the adblocking instead, which then means you have to only do the install once. OpenWRT runs on quite a few routers and there are even some very low cost ones like the DIR 615 which can cost less than £20. I am currently running one of these routers with OpenWRT and it is doing pretty well, although it has a very small flash, so you cannot install anything extra on it like OpenVPN or L2TP. If you want to set up an adblock script, then you have to configure your router so that SSH is enabled and then you have to log into it. Once you are on the command line, you then have to enter the following command:

wget -qO /etc/init.d/adblock

which will download the adblock script into the startup files directory. You then have to enter these commands:

chmod +x /etc/init.d/adblock

/etc/init.d/adblock enable

/etc/init.d/adblock start

and your router should now be blocking the domains that the adverts will originate from.

Adblock script for OpenWRT — Downloaded 1129 times