|
@@ -9,27 +9,43 @@ When the dns server on your router receives dns requests, you’ll sort out quer
|
9
|
9
|
and return the local ip address of your router and the internal web server delivers a transparent pixel instead.
|
10
|
10
|
|
11
|
11
|
## Main Features
|
12
|
|
-* support of the following domain blacklist sites (free for private usage, for commercial use please check their individual licenses):
|
13
|
|
- * [pgl.yoyo.org](http://pgl.yoyo.org/adservers), approx. 2.500 entries
|
14
|
|
- * [malwaredomains.com](http://malwaredomains.com), approx. 16.000 entries
|
15
|
|
- * [zeustracker.abuse.ch](https://zeustracker.abuse.ch), approx. 420 entries
|
16
|
|
- * [feodotracker.abuse.ch](https://feodotracker.abuse.ch), approx. 10 entries
|
17
|
|
- * [palevotracker.abuse.ch](https://palevotracker.abuse.ch), approx. 10 entries
|
18
|
|
- * [dshield.org](http://dshield.org), approx. 4.500 entries
|
19
|
|
- * [shallalist.de](http://www.shallalist.de) (categories "adv" "costtraps" "spyware" "tracker" "warez" enabled by default), approx. 32.000 entries
|
20
|
|
- * a short description of all shallalist categories can be found [online](http://www.shallalist.de/categories.html)
|
21
|
|
- * [spam404.com](http://www.spam404.com), approx. 5.000 entries
|
22
|
|
- * [winhelp2002.mvps.org](http://winhelp2002.mvps.org), approx. 15.000 entries
|
|
12
|
+* support of the following domain blocklist sources (free for private usage, for commercial use please check their individual licenses):
|
|
13
|
+ * [pgl.yoyo.org](http://pgl.yoyo.org/adservers)
|
|
14
|
+ * => weekly updates, approx. 2.500 entries (enabled by default)
|
|
15
|
+ * [malwaredomains.com](http://malwaredomains.com)
|
|
16
|
+ * => daily updates, approx. 16.000 entries
|
|
17
|
+ * [zeustracker.abuse.ch](https://zeustracker.abuse.ch)
|
|
18
|
+ * => daily updates, approx. 440 entries
|
|
19
|
+ * [feodotracker.abuse.ch](https://feodotracker.abuse.ch)
|
|
20
|
+ * => daily updates, approx. 0-10 entries
|
|
21
|
+ * [palevotracker.abuse.ch](https://palevotracker.abuse.ch)
|
|
22
|
+ * => daily updates, approx. 15 entries
|
|
23
|
+ * [dshield.org](http://dshield.org)
|
|
24
|
+ * => daily updates, approx. 4.500 entries
|
|
25
|
+ * [shallalist.de](http://www.shallalist.de) (categories "adv" "costtraps" "spyware" "tracker" "warez" enabled by default)
|
|
26
|
+ * => daily updates, approx. 32.000 entries (a short description of all shallalist categories can be found [online](http://www.shallalist.de/categories.html))
|
|
27
|
+ * [spam404.com](http://www.spam404.com)
|
|
28
|
+ * => infrequent updates, approx. 5.000 entries
|
|
29
|
+ * [winhelp2002.mvps.org](http://winhelp2002.mvps.org)
|
|
30
|
+ * => infrequent updates, approx. 15.000 entries
|
|
31
|
+ * [adaway.org](https://adaway.org)
|
|
32
|
+ * => infrequent updates, approx. 400 entries
|
|
33
|
+ * [disconnect.me](https://disconnect.me)
|
|
34
|
+ * => numerous updates on the same day, approx. 6.500 entries
|
|
35
|
+* each blocklist source will be updated and processed separately
|
|
36
|
+* timestamp check to download and process only updated blocklists
|
|
37
|
+* overall duplicate removal in separate blocklists (will be automatically disabled on low memory systems)
|
23
|
38
|
* blocklist parsing by fast & flexible regex rulesets
|
24
|
39
|
* additional white- and blacklist support for manual overrides
|
25
|
|
-* separate dynamic adblock network interface
|
26
|
|
-* separate dynamic uhttpd instance as pixel server
|
27
|
|
-* adblock quality checks after list update to ensure a reliable dnsmasq service
|
28
|
|
-* optional: powerful adblock list backup/restore handling
|
29
|
|
-* optional: adblock updates only on pre-defined wan interfaces (useful for (mobile) multiwan setups)
|
30
|
|
-* optional: domain query logging as a background service to easily identify free and already blocked domains (see example output below)
|
31
|
|
-* optional: status & error logging to separate file (req. ntp time sync)
|
32
|
|
-* optional: ntp time sync
|
|
40
|
+* use of dynamic adblock network interface
|
|
41
|
+* use of dynamic uhttpd instance as pixel server
|
|
42
|
+* use of quality checks after adblocklist updates to ensure a reliable dnsmasq service
|
|
43
|
+* optional features (disabled by default):
|
|
44
|
+ * powerful adblock list backup/restore handling
|
|
45
|
+ * adblock updates only on pre-defined wan interfaces (useful for (mobile) multiwan setups)
|
|
46
|
+ * domain query logging as a background service to easily identify free and already blocked domains (see example output below)
|
|
47
|
+ * ntp time sync
|
|
48
|
+ * status & error logging to separate file (req. ntp time sync)
|
33
|
49
|
|
34
|
50
|
## Prerequisites
|
35
|
51
|
* [openwrt](https://openwrt.org) (tested only with trunk > r47025), CC should also work
|
|
@@ -37,78 +53,87 @@ and return the local ip address of your router and the internal web server deliv
|
37
|
53
|
* curl
|
38
|
54
|
* wget (due to an openwrt bug still needed for certain https requests - see ticket #19621)
|
39
|
55
|
* optional: busybox find with *-mtime* support for logfile housekeeping (enabled by default with r47362, will be disabled if not found)
|
40
|
|
- * optional: coreutils-sort for reliable sort results, even on low memory systems
|
41
|
|
-* recommended: add an usb stick or any other storage device to supersize your /tmp directory with a swap partition (see [openwrt wiki](https://wiki.openwrt.org/doc/uci/fstab))
|
42
|
56
|
* the above dependencies and requirements will be checked during package installation & script startup, please check console output or *logread -e "adblock"* for errors
|
43
|
57
|
|
44
|
58
|
## Usage
|
45
|
59
|
* select & install adblock package (*opkg install adblock*)
|
46
|
60
|
* configure */etc/config/adblock* to your needs, see additional comments in *adblock.conf.sample*
|
47
|
|
-* at least configure the ip address of the local adblock interface/uhttpd instance, needs to be a different subnet from the normal LAN
|
48
|
|
-* optional: add additional domain white- or blacklist entries, one domain per line (wildcards & regex are not allowed!), both list are located in */etc/adblock*
|
49
|
|
-* by default openwrts main uhttpd instance is bind to all ports of your router. For a working adblock setup you have to bind uhttpd to the standard LAN port only, please change listen_http accordingly
|
|
61
|
+* at least configure the ip address of the local adblock interface/uhttpd instance, it needs to be a different subnet from the normal LAN
|
|
62
|
+* recommendation: there is no need to enable all blacklist sites at once, for normal use one to three lists should be sufficient
|
|
63
|
+* recommendation: to handle all blacklists at once add an usb stick or any other storage device to supersize your /tmp directory with a swap partition
|
|
64
|
+* => see [openwrt wiki](https://wiki.openwrt.org/doc/uci/fstab) for further details
|
|
65
|
+* add additional domain white- or blacklist entries, one domain per line (wildcards & regex are not allowed!), both lists are located in */etc/adblock*
|
|
66
|
+* by default openwrts main uhttpd instance is bind to all ports of your router,
|
|
67
|
+* for a working adblock setup you have to bind uhttpd to the standard LAN port only, please change listen_http accordingly
|
50
|
68
|
* start /usr/bin/adblock-update.sh and check console output or *logread -e "adblock"* for errors
|
51
|
69
|
|
52
|
70
|
## Distributed samples
|
53
|
71
|
* all sample configuration files stored in */etc/adblock/samples*
|
54
|
72
|
* to enable/disable additional domain query logging set the dnsmasq option *logqueries* accordingly, see *dhcp.config.sample*
|
55
|
73
|
* to bind uhttpd to standard LAN port only, see *uhttpd.config.sample*
|
56
|
|
-* for script autostart by rc.local and /tmp resizing on the fly see *rc.local.sample*
|
|
74
|
+* for rc.local based autostart and /tmp resizing on the fly see *rc.local.sample*
|
57
|
75
|
* for scheduled call of *adblock-update.sh* see *root.crontab.sample*
|
58
|
76
|
* to redirect/force all dns queries to your router see *firwall.user.sample*
|
59
|
77
|
* for further dnsmasq tweaks see *dnsmasq.conf.sample*
|
60
|
78
|
|
61
|
79
|
## Examples
|
62
|
80
|
|
63
|
|
- stdout excerpt for successful adblock run:
|
|
81
|
+ log of a full adblock run:
|
64
|
82
|
|
65
|
|
- adblock[11541] info : domain adblock processing started (0.22.2, r47665, 29.11.2015 14:58:11)
|
66
|
|
- adblock[11541] info : wan update check will be disabled
|
67
|
|
- adblock[11541] info : get ntp time sync (192.168.254.254), after 0 loops
|
68
|
|
- adblock[11541] info : shallalist (pre-)processing started ...
|
69
|
|
- adblock[11541] info : shallalist (pre-)processing finished (adv costtraps spyware tracker warez)
|
70
|
|
- adblock[11541] info : source download finished (http://pgl.yoyo.org/adservers/serverlist.php?hostformat=one-line&showintro=0&mimetype=plaintext, 2423 entries)
|
71
|
|
- adblock[11541] info : source download finished (http://mirror1.malwaredomains.com/files/justdomains, 16016 entries)
|
72
|
|
- adblock[11541] info : source download finished (https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist, 419 entries)
|
73
|
|
- adblock[11541] info : source download finished (https://feodotracker.abuse.ch/blocklist/?download=domainblocklist, 0 entries)
|
74
|
|
- adblock[11541] info : source download finished (https://palevotracker.abuse.ch/blocklists.php?download=domainblocklist, 12 entries)
|
75
|
|
- adblock[11541] info : source download finished (http://www.dshield.org/feeds/suspiciousdomains_Low.txt, 4542 entries)
|
76
|
|
- adblock[11541] info : source download finished (http://spam404bl.com/spam404scamlist.txt, 5193 entries)
|
77
|
|
- adblock[11541] info : source download finished (http://winhelp2002.mvps.org/hosts.txt, 13635 entries)
|
78
|
|
- adblock[11541] info : source download finished (file:////tmp/tmp.CgbMmO/shallalist.txt, 32446 entries)
|
79
|
|
- adblock[11541] info : empty source download finished (file:///etc/adblock/adblock.blacklist)
|
80
|
|
- adblock[11541] info : domain merging finished
|
81
|
|
- adblock[11541] info : new adblock list with 69646 domains loaded, backup generated
|
82
|
|
- adblock[11541] info : domain adblock processing finished (0.22.2, r47665, 29.11.2015 14:59:23)
|
|
83
|
+ adblock[1586] info : domain adblock processing started (0.40.0, r47670, 17.12.2015 10:50:09)
|
|
84
|
+ adblock[1586] info : wan update check will be disabled
|
|
85
|
+ adblock[1586] info : get ntp time sync (192.168.2.254), after 0 loops
|
|
86
|
+ adblock[1586] info : created new dynamic/volatile network interface (adblock, 192.168.2.1)
|
|
87
|
+ adblock[1586] info : created new dynamic/volatile uhttpd instance (adblock, 192.168.2.1)
|
|
88
|
+ adblock[1586] info : shallalist (pre-)processing started ...
|
|
89
|
+ adblock[1586] info : source download finished (http://pgl.yoyo.org/adservers/serverlist.php?hostformat=one-line&showintro=0&mimetype=plaintext, 2432 entries)
|
|
90
|
+ adblock[1586] info : domain merging finished (yoyo)
|
|
91
|
+ adblock[1586] info : source download finished (http://mirror1.malwaredomains.com/files/justdomains, 17368 entries)
|
|
92
|
+ adblock[1586] info : domain merging finished (malware)
|
|
93
|
+ adblock[1586] info : source download finished (https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist, 440 entries)
|
|
94
|
+ adblock[1586] info : domain merging finished (zeus)
|
|
95
|
+ adblock[1586] info : no online timestamp received, current date will be used (feodo)
|
|
96
|
+ adblock[1586] info : source download finished (https://feodotracker.abuse.ch/blocklist/?download=domainblocklist, 0 entries)
|
|
97
|
+ adblock[1586] info : empty domain input received (feodo)
|
|
98
|
+ adblock[1586] info : no online timestamp received, current date will be used (palevo)
|
|
99
|
+ adblock[1586] info : source download finished (https://palevotracker.abuse.ch/blocklists.php?download=domainblocklist, 16 entries)
|
|
100
|
+ adblock[1586] info : domain merging finished (palevo)
|
|
101
|
+ adblock[1586] info : source download finished (http://www.dshield.org/feeds/suspiciousdomains_Low.txt, 4542 entries)
|
|
102
|
+ adblock[1586] info : domain merging finished (dshield)
|
|
103
|
+ adblock[1586] info : source download finished (http://spam404bl.com/spam404scamlist.txt, 5193 entries)
|
|
104
|
+ adblock[1586] info : domain merging finished (spam404)
|
|
105
|
+ adblock[1586] info : source download finished (http://winhelp2002.mvps.org/hosts.txt, 13635 entries)
|
|
106
|
+ adblock[1586] info : domain merging finished (winhelp)
|
|
107
|
+ adblock[1586] info : source download finished (https://adaway.org/hosts.txt, 410 entries)
|
|
108
|
+ adblock[1586] info : domain merging finished (adaway)
|
|
109
|
+ adblock[1586] info : source download finished (https://s3.amazonaws.com/lists.disconnect.me/simple_malvertising.txt, 6343 entries)
|
|
110
|
+ adblock[1586] info : domain merging finished (disconnect)
|
|
111
|
+ adblock[1586] info : source download finished (file:////tmp/tmp.FIhIBh/shallalist.txt, 32458 entries)
|
|
112
|
+ adblock[1586] info : domain merging finished (shalla)
|
|
113
|
+ adblock[1586] info : source download finished (file:///etc/adblock/adblock.blacklist, 1 entries)
|
|
114
|
+ adblock[1586] info : domain merging finished (blacklist)
|
|
115
|
+ adblock[1586] info : remove duplicates in separate adblocklists ...
|
|
116
|
+ adblock[1586] info : adblocklists with overall 71552 domains loaded, new backups generated
|
|
117
|
+ adblock[1586] info : new domain query log background process started (pid: 2416)
|
|
118
|
+ adblock[1586] info : domain adblock processing finished (0.40.0, r47670, 17.12.2015 10:52:47)
|
83
|
119
|
|
84
|
120
|
|
85
|
|
- generated domain blocklist for dnsmasq:
|
|
121
|
+ domain blocklist for dnsmasq (disconnect.me after overall duplicate removal):
|
86
|
122
|
|
87
|
|
- address=/0-29.com/192.168.2.1
|
88
|
|
- address=/0-2u.com/192.168.2.1
|
89
|
|
- address=/0.r.msn.com/192.168.2.1
|
90
|
|
- address=/00.devoid.us/192.168.2.1
|
91
|
|
- address=/000007.ru/192.168.2.1
|
|
123
|
+ address=/0000mps.webpreview.dsl.net/192.168.2.1
|
|
124
|
+ address=/0001.2waky.com/192.168.2.1
|
|
125
|
+ address=/001wen.com/192.168.2.1
|
|
126
|
+ address=/002it.com/192.168.2.1
|
|
127
|
+ address=/00game.net/192.168.2.1
|
92
|
128
|
[...]
|
93
|
|
- address=/zzz.cn/192.168.2.1
|
94
|
|
- address=/zzzjsh.com/192.168.2.1
|
95
|
|
- ####################################################
|
96
|
|
- # last adblock list update: 20.11.2015 - 18:00:02
|
97
|
|
- # adblock-update.sh (0.21.0) - 73087 ad/abuse domains blocked
|
98
|
|
- # domain blacklist sources:
|
99
|
|
- # http://pgl.yoyo.org/adservers/serverlist.php?hostformat=one-line&showintro=0&mimetype=plaintext
|
100
|
|
- # http://mirror1.malwaredomains.com/files/justdomains
|
101
|
|
- # https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist
|
102
|
|
- # https://feodotracker.abuse.ch/blocklist/?download=domainblocklist
|
103
|
|
- # https://palevotracker.abuse.ch/blocklists.php?download=domainblocklist
|
104
|
|
- # http://www.dshield.org/feeds/suspiciousdomains_Low.txt
|
105
|
|
- # http://spam404bl.com/spam404scamlist.txt
|
106
|
|
- # http://winhelp2002.mvps.org/hosts.txt
|
107
|
|
- # file:////tmp/tmp.CLBLNF/shallalist.txt
|
108
|
|
- # file:///etc/adblock/adblock.blacklist
|
109
|
|
- #####
|
110
|
|
- # /etc/adblock/adblock.whitelist
|
111
|
|
- ####################################################
|
|
129
|
+ address=/zzsgssxh.com/192.168.2.1
|
|
130
|
+ address=/zzshw.net/192.168.2.1
|
|
131
|
+ address=/zztxdown.com/192.168.2.1
|
|
132
|
+ address=/zzxcws.com/192.168.2.1
|
|
133
|
+ #------------------------------------------------------------------
|
|
134
|
+ # adblock-update.sh (0.40.0) - 3710 ad/abuse domains blocked
|
|
135
|
+ # source: https://s3.amazonaws.com/lists.disconnect.me/simple_malvertising.txt
|
|
136
|
+ # last modified: Thu, 17 Dec 2015 09:21:17 GMT
|
112
|
137
|
|
113
|
138
|
|
114
|
139
|
domain query log excerpt:
|