mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 15:38:40 +01:00
adblock: logging & documentation update
- centralized logging via separate function to stdout, syslog and file - remove dependencies between helper functions - add two new options "adb_maxtime" and "adb_maxloop" - add description to every adblock config option (see adblock.conf.sample) - update README.md Signed-off-by: Dirk Brenken <dirk@brenken.org>
This commit is contained in:
@@ -24,7 +24,7 @@ and return the local ip address of your router and the internal web server deliv
|
||||
* separate dynamic adblock network interface
|
||||
* separate dynamic uhttpd instance as pixel server
|
||||
* optional: quality checks and a powerful backup/restore handling to ensure a reliable dnsmasq service
|
||||
* optional: adblock updates only on pre-defined wan interfaces
|
||||
* optional: adblock updates only on pre-defined wan interfaces (useful for (mobile) multiwan setups)
|
||||
* optional: domain query logging as a background service to easily identify free and already blocked domains
|
||||
* optional: ntp time sync
|
||||
* optional: status & error logging (req. ntp time sync)
|
||||
@@ -36,20 +36,87 @@ and return the local ip address of your router and the internal web server deliv
|
||||
* wget (due to an openwrt bug still needed for certain https requests - see ticket #19621)
|
||||
* busybox find with *-mtime* support for logfile housekeeping (enabled by default with r47362, will be disabled if not found)
|
||||
* optional: mounted usb stick or any other storage device to overcome limited memory resources on embedded router devices
|
||||
* the above dependencies will be checked during package installation & script runtime, please check *logread -e "adblock"* for errors
|
||||
* the above dependencies will be checked during package installation & script startup, please check console output or *logread -e "adblock"* for errors
|
||||
|
||||
## Usage
|
||||
* select & install adblock package (*opkg install adblock*)
|
||||
* configure /etc/config/adblock to your needs
|
||||
* start /usr/bin/adblock-update.sh and check *logread -e "adblock"* for errors
|
||||
* configure /etc/config/adblock to your needs, see additional comments in *adblock.conf.sample*
|
||||
* by default openwrt uhttpd config is bind to 0.0.0.0 (to all ports of your router). For a working adblock configuration you have to bind uHTTPd to the standard LAN port only, please change *listen_http* and *listen_https* accordingly
|
||||
* start /usr/bin/adblock-update.sh and check console output or *logread -e "adblock"* for errors
|
||||
|
||||
## Distributed samples
|
||||
* all sample configuration files stored in */etc/adblock/samples*.
|
||||
* to enable/disable additional domain query logging set the dnsmasq option *logqueries* accordingly, see *dhcp.config.sample*.
|
||||
* to bind uhttpd to standard LAN port only, see *uhttpd.config.sample*
|
||||
* for script autostart by rc.local and /tmp resizing on the fly see *rc.local.sample*.
|
||||
* for scheduled call of *adblock-update.sh* see *root.crontab.sample*.
|
||||
* to redirect/force all dns queries to your router see *firwall.user.sample*.
|
||||
* for further dnsmasq tweaks see *dnsmasq.conf.sample*.
|
||||
|
||||
## Examples
|
||||
|
||||
stdout excerpt for successful adblock run:
|
||||
|
||||
root@pi2wrt:~# /usr/bin/adblock-update.sh
|
||||
adblock[17771] info : domain adblock processing started (0.21.0)
|
||||
adblock[17771] info : get wan/update interface (wlan1), after 0 loops
|
||||
adblock[17771] info : get ntp time sync (0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org), after 0 loops
|
||||
adblock[17771] info : shallalist archive download finished
|
||||
adblock[17771] info : shallalist archive extraction finished
|
||||
adblock[17771] info : shallalist (pre-)processing finished (adv costtraps downloads spyware tracker warez)
|
||||
adblock[17771] info : source download finished (http://pgl.yoyo.org/adservers/serverlist.php?hostformat=one-line&showintro=0&mimetype=plaintext, 2426 entries)
|
||||
adblock[17771] info : source download finished (http://mirror1.malwaredomains.com/files/justdomains, 15275 entries)
|
||||
adblock[17771] info : source download finished (https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist, 3 entries)
|
||||
adblock[17771] info : source download finished (https://feodotracker.abuse.ch/blocklist/?download=domainblocklist, 0 entries)
|
||||
adblock[17771] info : source download finished (https://palevotracker.abuse.ch/blocklists.php?download=domainblocklist, 11 entries)
|
||||
adblock[17771] info : source download finished (http://www.dshield.org/feeds/suspiciousdomains_Low.txt, 4542 entries)
|
||||
adblock[17771] info : source download finished (http://spam404bl.com/spam404scamlist.txt, 5193 entries)
|
||||
adblock[17771] info : source download finished (http://winhelp2002.mvps.org/hosts.txt, 13852 entries)
|
||||
adblock[17771] info : source download finished (file:////tmp/tmp.emlDeH/shallalist.txt, 36961 entries)
|
||||
adblock[17771] info : source download finished (file:///etc/adblock/adblock.blacklist, 1 entries)
|
||||
adblock[17771] info : new adblock list with 73090 domains loaded, backup generated
|
||||
adblock[17771] info : domain adblock processing finished (0.21.0)
|
||||
|
||||
|
||||
generated domain blocklist for dnsmasq:
|
||||
|
||||
address=/0-29.com/192.168.2.1
|
||||
address=/0-2u.com/192.168.2.1
|
||||
address=/0.r.msn.com/192.168.2.1
|
||||
address=/00.devoid.us/192.168.2.1
|
||||
address=/000007.ru/192.168.2.1
|
||||
[...]
|
||||
address=/zzz.cn/192.168.2.1
|
||||
address=/zzzjsh.com/192.168.2.1
|
||||
####################################################
|
||||
# last adblock list update: 20.11.2015 - 18:00:02
|
||||
# adblock-update.sh (0.21.0) - 73087 ad/abuse domains blocked
|
||||
# domain blacklist sources:
|
||||
# http://pgl.yoyo.org/adservers/serverlist.php?hostformat=one-line&showintro=0&mimetype=plaintext
|
||||
# http://mirror1.malwaredomains.com/files/justdomains
|
||||
# https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist
|
||||
# https://feodotracker.abuse.ch/blocklist/?download=domainblocklist
|
||||
# https://palevotracker.abuse.ch/blocklists.php?download=domainblocklist
|
||||
# http://www.dshield.org/feeds/suspiciousdomains_Low.txt
|
||||
# http://spam404bl.com/spam404scamlist.txt
|
||||
# http://winhelp2002.mvps.org/hosts.txt
|
||||
# file:////tmp/tmp.CLBLNF/shallalist.txt
|
||||
# file:///etc/adblock/adblock.blacklist
|
||||
#####
|
||||
# /etc/adblock/adblock.whitelist
|
||||
####################################################
|
||||
|
||||
|
||||
domain query log excerpt:
|
||||
|
||||
query[A] www.seenby.de from fe80::6257:18ff:fe6b:4667
|
||||
query[A] tarifrechner.heise.de from 192.168.1.131
|
||||
query[A] www.mittelstandswiki.de from fe80::6257:18ff:fe6b:4667
|
||||
query[A] ad.doubleclick.net from 192.168.1.131
|
||||
ad.doubleclick.net is 192.168.2.1
|
||||
|
||||
|
||||
The first three queries are OK (not blocked), the last one has been blocked and answered by local dnsmasq instance.
|
||||
|
||||
Have fun!
|
||||
Dirk
|
||||
|
||||
Reference in New Issue
Block a user