Adblock support thread


#522

Hey Guys -

I am trying out adblock which I currently have 3.5.4-2 installed and enabled on my WRT-1900ACS router running LEDE. Everything seems pretty painless as I'm able to easily select from a variety of lists, so first of all, thanks for your work!

One thing I can't seem to get working is adding lists from iBlocklist.com. I have a subscription to the site which provides their lists or a custom list via a URL similar to entries already in Adblock's config.

The "Edit Blacklist" seems to only accept individual domain entries but in "Advanced" / "Edit Configuration" I saw all the code. I found three of the entries pointed to a URL which obtained a *.gz file so copied one of them and put in the custom data to produce the below:

config source 'china'
option adb_src 'http://list.iblocklist.com/?list=cn&fileformat=p2p&archiveformat=gz&username=bzowk&pin=702988'
option adb_src_rset '/^([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
option adb_src_desc 'All China ranges via iBlocklist'
list adb_src_cat 'adv'
list adb_src_cat 'costtraps'
list adb_src_cat 'spyware'
list adb_src_cat 'tracker'
list adb_src_cat 'warez'
option enabled '1'

Based on what I've read, I believe the issue I'm having with the above is the setting for "option adb.src.rset." I downloaded the file that the source i copied referenced - below is it's "option adb.src.rset" again followed by what the extracted contents of it's downloaded & extracted file were:

option adb_src_rset '/^([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}' 
  • root of extracted gz
    • adv
      • domains (file)
      • url (file)
    • aggresive
      • domains (file)
      • url (file)
    • ...........

The "domain" files list basic domain names:

000freexxx.com
004.frnl.de
01sexe.com
01viral.com
039068a.dialer-select.com

The "url" files list addresses as follows:

105.ch/media/uploads/banners/
111.67.199.51/marketing/
12.16.1.10/~web_ani
12.16.1.10/web_GIF
12.19.68.8/resources/images
12.25.11.217/us

The URLs for the lists I wish to use are much more basic. Their URL does not specify the filename (and won't work if adding it on) but only points to a single one. Below is an example:

http://list.iblocklist.com/?list=cn&fileformat=p2p&archiveformat=gz&username=username&pin=123456

Visiting the above URL with correct username prompts one to download a file like "cn.gz" which is obviously a compressed file. Once extracted, the .gz produces a single text file (cn.txt) in the root and no folders. Below is a snippet of the first few lines of the file for example:

# List distributed by iblocklist.com

China:1.0.1.0-1.0.1.255
China:1.0.2.0-1.0.3.255
China:1.0.32.0-1.0.63.255
China:1.1.0.0-1.1.0.255
China:1.1.2.0-1.1.3.255
China:1.1.4.0-1.1.7.255
China:1.1.8.0-1.1.8.255
China:1.1.9.0-1.1.9.255

Overall, I don't know how to configure my "option adb.src.rset" and/or any other settings which I may have incorrect. I'd think it would be fairly simple for the format I'm after - however - I cannot find any resources for what I need to configure it as. Could someone please assist?

Note: I realize "option adb.src.rset" should have underscores instead of periods, but Markdown simply listed it as "option adb_src_rset" so changed it for easier reading. :slight_smile:

Thank You!


#523

I'm on Adblock 3.5.5-1 and while it seems to start ok, it doesn't appear to blocking any domains (meaning I'm seeing all ads come through). Here's what's in the Adblock log -

Tue Sep  4 15:46:42 2018 user.info adblock-3.5.5[3250]: adblock instance started ::: action: start, priority: 0, pid: 3250
Tue Sep  4 15:49:02 2018 user.info adblock-3.5.5[3250]: blocklist with overall 23850 domains loaded successfully (Linksys Audi (EA3500), OpenWrt SNAPSHOT r7995-967d646)

I wasn't sure what to look for in system/kernel log. Here's the configs -

config adblock 'global'
	option adb_dns 'dnsmasq'
	option adb_trigger 'wan'
	option adb_fetchutil 'wget'
	option adb_enabled '1'

config adblock 'extra'
	option adb_debug '0'
	option adb_forcedns '0'
	option adb_nice '0'
	option adb_forcesrt '1'
	option adb_maxqueue '16'
	option adb_dnsflush '1'

I've tried different startup triggers, including timed, and manual stop/start/restart with no change unfortunately, so just wanted to let @dibdot know and see if you might have an idea what's wrong.

edit - I enabled debugging and here's the output -

Tue Sep  4 16:05:11 2018 user.info adblock-3.5.5[3265]: adblock instance started ::: action: start, priority: 0, pid: 3265
Tue Sep  4 16:05:11 2018 user.debug adblock-3.5.5[3265]: f_jsnup::: status: running, mode: normal mode, cnt: , notify: 0, notify_cnt: 0, notify_pid: -
Tue Sep  4 16:05:12 2018 user.debug adblock-3.5.5[3265]: f_uci  ::: config: dhcp, change:
Tue Sep  4 16:05:12 2018 user.debug adblock-3.5.5[3265]: f_uci  ::: config: firewall, change:
Tue Sep  4 16:05:12 2018 user.debug adblock-3.5.5[3265]: f_main ::: dns: dnsmasq, fetch_util: /usr/bin/wget (built-in), backup: 0, backup_mode: 0, dns_jail: 0, force_srt: 1, force_dns: 0, mem_total: 58, mem_free: 12, max_queue: 16
Tue Sep  4 16:05:12 2018 user.debug adblock-3.5.5[3265]: f_main ::: name: adaway, enabled: 1
Tue Sep  4 16:05:12 2018 user.debug adblock-3.5.5[3265]: f_main ::: name: adguard, enabled: 1
Tue Sep  4 16:05:13 2018 user.debug adblock-3.5.5[3265]: f_main ::: name: bitcoin, enabled: 1
Tue Sep  4 16:05:13 2018 user.debug adblock-3.5.5[3265]: f_main ::: name: blacklist, enabled: 1
Tue Sep  4 16:05:13 2018 user.debug adblock-3.5.5[3265]: f_main ::: name: disconnect, enabled: 1
Tue Sep  4 16:05:13 2018 user.debug adblock-3.5.5[3265]: f_main ::: name: dshield, enabled: 0
Tue Sep  4 16:05:13 2018 user.debug adblock-3.5.5[3265]: f_list ::: name: dshield, mode: remove, cnt: 0, in_rc: 0, out_rc: 0
Tue Sep  4 16:05:13 2018 user.debug adblock-3.5.5[3265]: f_main ::: name: feodo, enabled: 0
Tue Sep  4 16:05:14 2018 user.debug adblock-3.5.5[3265]: f_list ::: name: feodo, mode: remove, cnt: 0, in_rc: 0, out_rc: 0
Tue Sep  4 16:05:14 2018 user.debug adblock-3.5.5[3265]: f_main ::: name: hphosts, enabled: 0
Tue Sep  4 16:05:14 2018 user.debug adblock-3.5.5[3265]: f_list ::: name: hphosts, mode: remove, cnt: 0, in_rc: 0, out_rc: 0
Tue Sep  4 16:05:14 2018 user.debug adblock-3.5.5[3265]: f_main ::: name: malware, enabled: 0
Tue Sep  4 16:05:14 2018 user.debug adblock-3.5.5[3265]: f_list ::: name: malware, mode: remove, cnt: 0, in_rc: 0, out_rc: 0
Tue Sep  4 16:05:14 2018 user.debug adblock-3.5.5[3265]: f_main ::: name: malwarelist, enabled: 0
Tue Sep  4 16:05:15 2018 user.debug adblock-3.5.5[3265]: f_list ::: name: malwarelist, mode: remove, cnt: 0, in_rc: 0, out_rc: 0
Tue Sep  4 16:05:15 2018 user.debug adblock-3.5.5[3265]: f_main ::: name: openphish, enabled: 0
Tue Sep  4 16:05:15 2018 user.debug adblock-3.5.5[3265]: f_list ::: name: openphish, mode: remove, cnt: 0, in_rc: 0, out_rc: 0
Tue Sep  4 16:05:15 2018 user.debug adblock-3.5.5[3265]: f_main ::: name: ransomware, enabled: 0
Tue Sep  4 16:05:15 2018 user.debug adblock-3.5.5[3265]: f_list ::: name: ransomware, mode: remove, cnt: 0, in_rc: 0, out_rc: 0
Tue Sep  4 16:05:15 2018 user.debug adblock-3.5.5[3265]: f_main ::: name: reg_cn, enabled: 0
Tue Sep  4 16:05:15 2018 user.debug adblock-3.5.5[3265]: f_list ::: name: reg_cn, mode: remove, cnt: 0, in_rc: 0, out_rc: 0
Tue Sep  4 16:05:15 2018 user.debug adblock-3.5.5[3265]: f_main ::: name: reg_cz, enabled: 0
Tue Sep  4 16:05:16 2018 user.debug adblock-3.5.5[3265]: f_list ::: name: reg_cz, mode: remove, cnt: 0, in_rc: 0, out_rc: 0
Tue Sep  4 16:05:16 2018 user.debug adblock-3.5.5[3265]: f_list ::: name: adaway, mode: download, cnt: 409, in_rc: 0, out_rc: 0
Tue Sep  4 16:05:16 2018 user.debug adblock-3.5.5[3265]: f_main ::: name: reg_de, enabled: 0
Tue Sep  4 16:05:16 2018 user.debug adblock-3.5.5[3265]: f_list ::: name: reg_de, mode: remove, cnt: 0, in_rc: 0, out_rc: 0
Tue Sep  4 16:05:16 2018 user.debug adblock-3.5.5[3265]: f_main ::: name: reg_id, enabled: 0
Tue Sep  4 16:05:16 2018 user.debug adblock-3.5.5[3265]: f_list ::: name: reg_id, mode: remove, cnt: 0, in_rc: 0, out_rc: 0
Tue Sep  4 16:05:16 2018 user.debug adblock-3.5.5[3265]: f_list ::: name: bitcoin, mode: download, cnt: 451, in_rc: 0, out_rc: 0
Tue Sep  4 16:05:16 2018 user.debug adblock-3.5.5[3265]: f_main ::: name: reg_nl, enabled: 0
Tue Sep  4 16:05:16 2018 user.debug adblock-3.5.5[3265]: f_list ::: name: reg_nl, mode: remove, cnt: 0, in_rc: 0, out_rc: 0
Tue Sep  4 16:05:16 2018 user.debug adblock-3.5.5[3265]: f_main ::: name: reg_pl, enabled: 0
Tue Sep  4 16:05:17 2018 user.debug adblock-3.5.5[3265]: f_list ::: name: reg_pl, mode: remove, cnt: 0, in_rc: 0, out_rc: 0
Tue Sep  4 16:05:17 2018 user.debug adblock-3.5.5[3265]: f_list ::: name: disconnect, mode: download, cnt: 3257, in_rc: 0, out_rc: 0
Tue Sep  4 16:05:17 2018 user.debug adblock-3.5.5[3265]: f_main ::: name: reg_ro, enabled: 0
Tue Sep  4 16:05:17 2018 user.debug adblock-3.5.5[3265]: f_list ::: name: reg_ro, mode: remove, cnt: 0, in_rc: 0, out_rc: 0
Tue Sep  4 16:05:17 2018 user.debug adblock-3.5.5[3265]: f_main ::: name: reg_ru, enabled: 0
Tue Sep  4 16:05:17 2018 user.debug adblock-3.5.5[3265]: f_list ::: name: reg_ru, mode: remove, cnt: 0, in_rc: 0, out_rc: 0
Tue Sep  4 16:05:17 2018 user.debug adblock-3.5.5[3265]: f_main ::: name: shalla, enabled: 0
Tue Sep  4 16:05:17 2018 user.debug adblock-3.5.5[3265]: f_list ::: name: shalla, mode: remove, cnt: 0, in_rc: 0, out_rc: 0
Tue Sep  4 16:05:17 2018 user.debug adblock-3.5.5[3265]: f_main ::: name: spam404, enabled: 0
Tue Sep  4 16:05:17 2018 user.debug adblock-3.5.5[3265]: f_list ::: name: spam404, mode: remove, cnt: 0, in_rc: 0, out_rc: 0
Tue Sep  4 16:05:17 2018 user.debug adblock-3.5.5[3265]: f_main ::: name: sysctl, enabled: 0
Tue Sep  4 16:05:17 2018 user.debug adblock-3.5.5[3265]: f_list ::: name: sysctl, mode: remove, cnt: 0, in_rc: 0, out_rc: 0
Tue Sep  4 16:05:17 2018 user.debug adblock-3.5.5[3265]: f_main ::: name: urlhaus, enabled: 0
Tue Sep  4 16:05:18 2018 user.debug adblock-3.5.5[3265]: f_list ::: name: urlhaus, mode: remove, cnt: 0, in_rc: 0, out_rc: 0
Tue Sep  4 16:05:18 2018 user.debug adblock-3.5.5[3265]: f_main ::: name: ut_capitole, enabled: 0
Tue Sep  4 16:05:18 2018 user.debug adblock-3.5.5[3265]: f_list ::: name: ut_capitole, mode: remove, cnt: 0, in_rc: 0, out_rc: 0
Tue Sep  4 16:05:18 2018 user.debug adblock-3.5.5[3265]: f_main ::: name: whocares, enabled: 0
Tue Sep  4 16:05:18 2018 user.debug adblock-3.5.5[3265]: f_list ::: name: whocares, mode: remove, cnt: 0, in_rc: 0, out_rc: 0
Tue Sep  4 16:05:18 2018 user.debug adblock-3.5.5[3265]: f_main ::: name: winspy, enabled: 0
Tue Sep  4 16:05:18 2018 user.debug adblock-3.5.5[3265]: f_list ::: name: winspy, mode: remove, cnt: 0, in_rc: 0, out_rc: 0
Tue Sep  4 16:05:18 2018 user.debug adblock-3.5.5[3265]: f_main ::: name: winhelp, enabled: 0
Tue Sep  4 16:05:18 2018 user.debug adblock-3.5.5[3265]: f_list ::: name: winhelp, mode: remove, cnt: 0, in_rc: 0, out_rc: 0
Tue Sep  4 16:05:19 2018 user.debug adblock-3.5.5[3265]: f_main ::: name: youtube, enabled: 0
Tue Sep  4 16:05:19 2018 user.debug adblock-3.5.5[3265]: f_list ::: name: youtube, mode: remove, cnt: 0, in_rc: 0, out_rc: 0
Tue Sep  4 16:05:19 2018 user.debug adblock-3.5.5[3265]: f_main ::: name: yoyo, enabled: 0
Tue Sep  4 16:05:19 2018 user.debug adblock-3.5.5[3265]: f_list ::: name: yoyo, mode: remove, cnt: 0, in_rc: 0, out_rc: 0
Tue Sep  4 16:05:19 2018 user.debug adblock-3.5.5[3265]: f_main ::: name: zeus, enabled: 0
Tue Sep  4 16:05:19 2018 user.debug adblock-3.5.5[3265]: f_list ::: name: zeus, mode: remove, cnt: 0, in_rc: 0, out_rc: 0
Tue Sep  4 16:10:08 2018 user.debug adblock-3.5.5[3265]: f_list ::: name: adguard, mode: download, cnt: 21412, in_rc: 0, out_rc: 0
Tue Sep  4 16:10:08 2018 user.debug adblock-3.5.5[3265]: f_list ::: name: overall, mode: merge, cnt: 25529, in_rc: 0, out_rc: 0
Tue Sep  4 16:10:08 2018 user.debug adblock-3.5.5[3265]: f_hash ::: hash_util: /usr/bin/sha256sum, hash: 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b, out_rc: 1
Tue Sep  4 16:10:32 2018 user.debug adblock-3.5.5[3265]: f_tld  ::: source: /tmp/tmp.AKciHC/adb_list.overall, cnt: 25529, cnt_srt: 24621, cnt_tld: 23850
Tue Sep  4 16:10:35 2018 user.debug adblock-3.5.5[3265]: f_list ::: name: overall, mode: final, cnt: 23850, in_rc: 0, out_rc: 0
Tue Sep  4 16:10:36 2018 user.debug adblock-3.5.5[3265]: f_hash ::: hash_util: /usr/bin/sha256sum, hash: 8e7b9d62146e5926d3d29fcd5f1d5cc90096dd1ab0be56f2f87de6143831671b, out_rc: 1
Tue Sep  4 16:10:43 2018 user.debug adblock-3.5.5[3265]: f_dnsup::: cache_util: -, cache_rc: -, cache_flush: 1, cache_cnt: 0, rc: 0
Tue Sep  4 16:10:43 2018 user.debug adblock-3.5.5[3265]: f_jsnup::: status: enabled, mode: normal mode, cnt: 23850, notify: 0, notify_cnt: 0, notify_pid: -
Tue Sep  4 16:10:43 2018 user.info adblock-3.5.5[3265]: blocklist with overall 23850 domains loaded successfully (Linksys Audi (EA3500), OpenWrt SNAPSHOT r7995-967d646)

#524

Router & build?


#525

Last line of the debug log:

Linksys Audi (EA3500), OpenWrt SNAPSHOT r7995-967d646)

#526

Your log looks OK. Please provide the content of /etc/config/dhcp and the output of (fired from a connected client):

nslookup doubleclick.net


#527

iblocklist don't provide domains/hosts ... they deliver lists with ip adresses, you can't that import via adblock, cause this is a DNS addon and relies on domain blacklists.

Maybe you should check out the early bird "banIP" from me (see banIP: new project needs testers & feedback), which is IP based and also support iblocklist (only CIDR file format, not P2P).

To be honest, banIP is focused on blocking incoming connections (superseded BCP38) and not to block outgoing ad-related IPs ... still you can configure it like that, but DNS based blocking is much more effective in this regard.


#528

Sorry it took so long, here's the output of /etc/config/dhcp -

~# cat /etc/config/dhcp

config dnsmasq
	option domainneeded '1'
	option localise_queries '1'
	option rebind_protection '1'
	option rebind_localhost '1'
	option local '/lan/'
	option domain 'lan'
	option expandhosts '1'
	option authoritative '1'
	option readethers '1'
	option leasefile '/tmp/dhcp.leases'
	option resolvfile '/tmp/resolv.conf.auto'
	option nonwildcard '1'
	option localservice '1'
	list rebind_domain 'plex.direct'

config dhcp 'lan'
	option interface 'lan'
	option start '100'
	option limit '150'
	option leasetime '12h'
	option dhcpv6 'server'
	option ra 'server'

config dhcp 'wan'
	option interface 'wan'
	option ignore '1'

config odhcpd 'odhcpd'
	option maindhcp '0'
	option leasefile '/tmp/hosts/odhcpd'
	option leasetrigger '/usr/sbin/odhcpd-update'
	option loglevel '4'

config dhcp 'Guest'
	option start '100'
	option interface 'Guest'
	option limit '110'
	option leasetime '4h'

And nslookup form a connected client -

~# nslookup doubleclick.net
Server:		127.0.0.1
Address:	127.0.0.1#53

Name:      doubleclick.net
Address 1: 172.217.12.46
Address 2: 2607:f8b0:4000:815::200e

#529

What a pity - it's a bug in 3.5.5 ... to fix it manually, add in the section "config dnsmasq" the following option:

option serversfile '/tmp/adb_list.overall'

After that restart dnsmasq. I'll push 3.5.5v2 in a few minutes - sorry.


#530

That got it working, thanks for your help and all your your hard work on Adblock, it's much appreciated.


#531

Thanks for your report. The bugfix version (3.5.5v2) is now in snapshot & 18.06 repo.


#532

now i could see why adblock was not working :thinking:

after adding option serversfile '/tmp/adb_list.overall' to /etc/config/dhcp , adblock starts blocking ads :hugs:

still there is issue with adblock logs not showing and reason i could not see why adblock was not working.

thanks for the hard work on 'adblock' :+1:


#533

Tried adding domains to the blacklist, I can still access those domains after saving (and suspending/starting adblock)
Any idea why? The builtin lists seems to work fine however.


#535

A newbie here.. Somehow I miss something on blocking ads. Output of configuration file has been listed below. Could you let me know, where I am wrong ?

root@OpenWrt:/etc/config# ip r
default via 192.168.1.1 dev wlan0  src 192.168.1.8
192.168.0.0/19 dev wlan0 scope link  src 192.168.1.8
192.168.2.0/25 dev br-lan scope link  src 192.168.2.1

root@OpenWrt:/etc/config# cat /etc/config/dhcp

config dnsmasq
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option expandhosts '1'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.auto'
        option nonwildcard '1'
        option localservice '1'
        option serversfile '/tmp/adb_list.overall'
        option domain 'home'

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option force '1'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'

config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'
        option loglevel '4'

config dnsmasq
        option serversfile '/tmp/adb_list.overall'
        option rebind_protection '0'
        option localservice '0'
        option nonwildcard '0'
        option authoritative '1'

root@OpenWrt:/etc/config#

C:\>nslookup doubleclick.net
Server:  OpenWrt
Address:  192.168.2.1

Non-authoritative answer:
Name:    doubleclick.net
Addresses:  2404:6800:4003:80c::200e
          172.217.27.46

#536

What are the first two configuration blocks of /etc/config/adblock?


#537

You have defined multiple dnsmasq instances, is this intended (2x 'config dnmasq')? If so, please use named sections, e.g. config dnsmasq 'main' and config dnsmasq 'guest', if not please remove the second section.

Also please provide the output of /etc/init.d/adblock status


#538

Whenever you add domains to your blacklist you have to restart adblock processing ("refresh" button in LuCI), suspend/resume did not refresh your list content.


#539

I fixed it, I thought the firmware I use had it configured from scratch but I had to add the serversfile to /etc/config/dhcp. I don't know why it appered to be working at first, maybe funky browser cache.


#540

I have removed second section and requested output in below.

root@OpenWrt:/etc/config# /etc/init.d/adblock status
::: adblock runtime information
  + adblock_status  : enabled
  + adblock_version : 3.5.5-2
  + overall_domains : 0 (normal mode)
  + fetch_utility   : -
  + dns_backend     : dnsmasq (/tmp)
  + last_rundate    : 10.09.2018 10:49:35
  + system_release  : GL.iNet GL-AR150, OpenWrt 18.06.1 r7258-5eb055306f
root@OpenWrt:/etc/config#

#541

Another question tho', there seems to be a limit on how many domains you can blacklist under the advanced section?


#542

Yep, the used LuCI SimpleForm is limited to 100KB (to guarantee good response times)! If you really need bigger white-/blacklist, you can edit those files directly in a terminal session.