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 http://www.macpczone.co.uk/system/files/uploads/adblock_0.sh

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.

Download: 
Adblock script for OpenWRT — Downloaded 4369 times
(If you're a human, don't change the following field)
Your first name.
(If you're a human, don't change the following field)
Your first name.
(If you're a human, don't change the following field)
Your first name.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
  • Email addresses will be obfuscated in the page source to reduce the chances of being harvested by spammers.