You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
3.2 KiB

  1. # adblock script for openwrt
  2. ## Description
  3. A lot of people already use adblocker plugins within their desktop browsers,
  4. but what if you are using your (smart) phone, tablet, watch or any other wlan gadget...
  5. ...getting rid of annoying ads, trackers and other abuse sites (like facebook ;-) is simple: block them with your router.
  6. When the dns server on your router receives dns requests, you’ll sort out queries that ask for the [A] resource records of ad servers
  7. and return the local ip address of your router and the internal web server delivers a transparent pixel instead.
  8. ## Main Features
  9. * support of the following domain blacklist sites (free for private usage, for commercial use please check their individual licenses):
  10. * [pgl.yoyo.org](http://pgl.yoyo.org/adservers)
  11. * [malwaredomains.com](http://malwaredomains.com)
  12. * [zeustracker.abuse.ch](https://zeustracker.abuse.ch)
  13. * [feodotracker.abuse.ch](https://feodotracker.abuse.ch)
  14. * [palevotracker.abuse.ch](https://palevotracker.abuse.ch)
  15. * [dshield.org](http://dshield.org)
  16. * [shallalist.de](http://www.shallalist.de) (tested with the categories "adv" "costtraps" "downloads" "spyware" "tracker" "warez")
  17. * [spam404.com](http://www.spam404.com)
  18. * [winhelp2002.mvps.org](http://winhelp2002.mvps.org)
  19. * blocklist parsing by fast & flexible regex rulesets
  20. * additional white- and blacklist support for manual overrides
  21. * separate dynamic adblock network interface
  22. * separate dynamic uhttpd instance as pixel server
  23. * optional: quality checks and a powerful backup/restore handling to ensure a reliable dnsmasq service
  24. * optional: adblock updates only on pre-defined wan interfaces
  25. * optional: domain query logging as a background service to easily identify free and already blocked domains
  26. * optional: ntp time sync
  27. * optional: status & error logging (req. ntp time sync)
  28. ## Prerequisites
  29. * [openwrt](https://openwrt.org) (tested only with trunk > r47025), CC should also work
  30. * additional software packages:
  31. * curl
  32. * wget (due to an openwrt bug still needed for certain https requests - see ticket #19621)
  33. * busybox find with *-mtime* support for logfile housekeeping (enabled by default with r47362, will be disabled if not found)
  34. * optional: mounted usb stick or any other storage device to overcome limited memory resources on embedded router devices
  35. * the above dependencies will be checked during package installation & script runtime, please check *logread -e "adblock"* for errors
  36. ## Usage
  37. * select & install adblock package (*opkg install adblock*)
  38. * configure /etc/config/adblock to your needs
  39. * start /usr/bin/adblock-update.sh and check *logread -e "adblock"* for errors
  40. ## Distributed samples
  41. * all sample configuration files stored in */etc/adblock/samples*.
  42. * to enable/disable additional domain query logging set the dnsmasq option *logqueries* accordingly, see *dhcp.config.sample*.
  43. * for script autostart by rc.local and /tmp resizing on the fly see *rc.local.sample*.
  44. * for scheduled call of *adblock-update.sh* see *root.crontab.sample*.
  45. * to redirect/force all dns queries to your router see *firwall.user.sample*.
  46. * for further dnsmasq tweaks see *dnsmasq.conf.sample*.
  47. Have fun!
  48. Dirk