Adblock support thread

Hi,

is there a list which programs adblock is using (like nslookup, tcpdump, sort, etc.) available? The script is to large to find them all by hand.

core dependencies are:

  • busybox shell (incl. awk, grep, nslookup, zcat, logger etc.)
  • coreutils-sort
  • ca-bundle
  • OpenWrt environment (procd, ubus, uci, opkg, jshn, jsonfilter etc.)
  • a dns server (dnsmasq, unbound, kresd, bind)
  • a download utility (uclient-fetch, curl, wget, aria2c)

optional:

  • tcpdump (for reporting)
  • gawk (as busybox awk replacement)
  • maybe more ... :wink:
1 Like

Hello, I recently installed adblock however it doesn't seem to be blocking any ads or domains. Not sure what am I missing.

root@Router:/# /etc/init.d/adblock status_service
::: adblock runtime information
  + adblock_status  : enabled
  + adblock_version : 4.0.6
  + blocked_domains : 0
  + active_sources  : adaway adguard disconnect yoyo
  + dns_backend     : dnsmasq, /tmp/dnsmasq.d
  + run_utils       : /bin/uclient-fetch, /usr/bin/awk
  + run_ifaces      : trigger: wan, report: wlan1
  + run_directories : base: /tmp, backup: /tmp, report: /tmp, jail: /tmp
  + run_flags       : backup: 1, reset: 0, flush: 1, force: 1, search: 0, report: 1, mail: 0, jail: 0
  + last_run        : reload, 0m 8s, 253/208/189, 25.07.2020 14:36:59
  + system          : Xiaomi Mi Router 3G, OpenWrt 19.07.3 r11063-85e04e9f46

root@Router:/# cat /etc/config/adblock

config adblock 'global'
        option adb_enabled '1'
        option adb_safesearch '0'
        option adb_dnsfilereset '0'
        option adb_mail '0'
        option adb_backup '1'
        option adb_maxqueue '4'
        list adb_sources 'adaway'
        list adb_sources 'adguard'
        list adb_sources 'disconnect'
        list adb_sources 'yoyo'
        option adb_dns 'dnsmasq'
        option adb_fetchutil 'uclient-fetch'
        option adb_report '1'
        option adb_trigger 'wan'
        option adb_debug '1'
        option adb_dnsflush '1'
        option adb_repiface 'wlan1'
        option adb_forcedns '1'

Looks like you are running an old version, upgrade advised perhaps also openwrt itself.

adblock = 4.0.6
OpenWRt = 19.07.3

Both are latest versions which I installed yesterday, you can see the version above

 /etc/init.d/adblock status_service

Please check your log (logread -e "adblock") ... most probably a download problem, maybe uclient-fetch lacks ssl support in your setup.

1 Like

SSL was the issue, installed and I can see count in blocked domains. I am gonna give some time before I fetch the report.

On which interface should I get the report for?

image

Just keep it "unspecified" ... the auto-detection works quite fine in most setups.

i have error, please help

Sun Jul 26 17:12:34 2020 user.info adblock-4.0.6[20000]: adblock instance started ::: action: reload, priority: 0, pid: 20000
Sun Jul 26 17:12:35 2020 user.info adblock-4.0.6[20000]: download of 'adaway' failed, url: https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt, rule: /^127.0.0.1[[:space:]]+([[:alnum:]-]{1,63}.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}, categories: -, rc: 1, log: /bin/uclient-fetch: SSL support not available, please install one of the libustream-.*[ssl|tls] packages as well as the ca-bundle and ca-certificates packages.
Sun Jul 26 17:12:35 2020 user.info adblock-4.0.6[20000]: download of 'adguard' failed, url: https://filters.adtidy.org/windows/filters/15.txt, rule: BEGIN{FS="[/|^|\r]"}/^||([[:alnum:]
-]{1,63}.)+[[:alpha:]]+[/^\r]+$/{print tolower($3)}, categories: -, rc: 1, log: /bin/uclient-fetch: SSL support not available, please install one of the libustream-.[ssl|tls] packages as well as the ca-bundle and ca-certificates packages.
Sun Jul 26 17:12:35 2020 user.info adblock-4.0.6[20000]: download of 'disconnect' failed, url: https://s3.amazonaws.com/lists.disconnect.me/simple_malvertising.txt, rule: /^([[:alnum:]_-]{1,63}.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}, categories: -, rc: 1, log: /bin/uclient-fetch: SSL support not available, please install one of the libustream-.
[ssl|tls] packages as well as the ca-bundle and ca-certificates packages.
Sun Jul 26 17:12:35 2020 user.info adblock-4.0.6[20000]: download of 'yoyo' failed, url: https://pgl.yoyo.org/adservers/serverlist.php?hostformat=nohtml&showintro=0&mimetype=plaintext, rule: /^([[:alnum:]_-]{1,63}.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}, categories: -, rc: 1, log: /bin/uclient-fetch: SSL support not available, please install one of the libustream-.*[ssl|tls] packages as well as the ca-bundle and ca-certificates packages.
Sun Jul 26 17:12:40 2020 user.info adblock-4.0.6[20000]: blocklist with overall 0 blocked domains loaded successfully (Buffalo WZR-HP-AG300H/WZR-600DHP, OpenWrt 19.07.3 r11063-85e04e9f46)

Please use the "Preformatted text </>" button for logs, scripts, configs and general console output.
grafik
Please edit your post accordingly. Thank you! :slight_smile:

1 Like

The message is quite clear. So install the missing packages on your router.

1 Like

Has anyone experienced adblock interfering with Google Cloud Messaging (now I think it's called Firebase Cloud Messaging). I can't figure out why my phones stop receiving background messages when I enable adblock on my home network. It happens regardless of blocklist selection.

As a novice, I'm not sure where to even start with troubleshooting this. Any pointers would be appreciated.

Log view:

Sat Aug 15 10:34:19 2020 user.info adblock-4.0.6[15544]: adblock instance started ::: action: reload, priority: 0, pid: 15544
Sat Aug 15 10:34:30 2020 user.info adblock-4.0.6[15544]: preparation of 'bitcoin' failed, rc: 2
Sat Aug 15 10:34:33 2020 user.info adblock-4.0.6[15544]: preparation of 'disconnect' failed, rc: 2
Sat Aug 15 10:34:41 2020 user.info adblock-4.0.6[15544]: preparation of 'adaway' failed, rc: 2
Sat Aug 15 10:34:50 2020 user.info adblock-4.0.6[15544]: preparation of 'adguard' failed, rc: 2
Sat Aug 15 10:34:53 2020 user.info adblock-4.0.6[15544]: preparation of 'malwarelist' failed, rc: 2
Sat Aug 15 10:34:54 2020 user.info adblock-4.0.6[15544]: preparation of 'openphish' failed, rc: 2
Sat Aug 15 10:34:56 2020 user.info adblock-4.0.6[15544]: preparation of 'spam404' failed, rc: 2
Sat Aug 15 10:35:00 2020 user.info adblock-4.0.6[15544]: preparation of 'whocares' failed, rc: 2
Sat Aug 15 10:35:01 2020 user.info adblock-4.0.6[15544]: preparation of 'winspy' failed, rc: 2
Sat Aug 15 10:35:02 2020 user.info adblock-4.0.6[15544]: preparation of 'yoyo' failed, rc: 2
Sat Aug 15 10:35:05 2020 user.info adblock-4.0.6[15544]: preparation of 'winhelp' failed, rc: 2
Sat Aug 15 10:35:13 2020 user.info adblock-4.0.6[15544]: blocklist with overall 0 blocked domains loaded successfully and reset afterwards (TP-Link Archer C7 v2, OpenWrt 19.07.3 r11063-85e04e9f46)
Sat Aug 15 10:35:13 2020 user.info adblock-4.0.6[16176]: ubus/adblock monitor started

Result:

Blocked Domains: 0

Configuration:

config adblock 'global'
	option adb_enabled '1'
	option adb_safesearch '0'
	option adb_mail '0'
	option adb_maxqueue '4'
	option adb_dns 'dnsmasq'
	option adb_trigger 'wan'
	option adb_repiface 'br-lan'
	option adb_report '0'
	option adb_forcedns '0'
	list adb_sources 'adaway'
	list adb_sources 'adguard'
	list adb_sources 'bitcoin'
	list adb_sources 'disconnect'
	list adb_sources 'malwarelist'
	list adb_sources 'openphish'
	list adb_sources 'spam404'
	list adb_sources 'whocares'
	list adb_sources 'winhelp'
	list adb_sources 'winspy'
	list adb_sources 'yoyo'
	option adb_debug '0'
	option adb_dnsfilereset '1'
	option adb_dnsflush '1'
	option adb_backup '1'
	option adb_fetchutil 'uclient-fetch'

Do you know what's wrong?

No, most probably a sort problem, please provide the output of:

sort --version
sort: unrecognized option: version
BusyBox v1.30.1 () multi-call binary.

Usage: sort [-nru] [FILE]...

Sort lines of text

        -n      Sort numbers
        -r      Reverse sort order
        -s      Stable (don't sort ties alphabetically)
        -u      Suppress duplicate lines
        -z      Lines are terminated by NUL, not newline

The adblock package depends on gnu sort (coreutils-sort, it's a dependency during package installation) ... it doesn't work with busybox sort, cause it uses a mergesort.

I've noticed that Adblock has changed the Dnsmasq config method from addnhosts to confdir.

However, there's an opinion:

@dibdot, could you clarify which method is more effective from the point of blocklist processing speed and RAM consumption.

The adblock package depends on gnu sort (coreutils-sort, it's a dependency during package installation) ... it doesn't work with busybox sort, cause it uses a mergesort.

I reinstalled adblock and package coreutils-sort. Now adblock works fine. Thank you!

Hi,

sorry I've never tested that - and adblock never used addnhosts ... cause it's not flexible enough (e.g. you have to block each host separately for IPv4 and IPv6, no domain wildcards, no selective whitelisting etc.). The now used "address" method is quite flexible and should be a bit faster than the formerly used "serversfile" method. If there are concerns regarding performance it should be addressed upstream IMHO.

I know that the pihole guys are proud of blocklists with multi-zillions entries ... but that's not my playground.

1 Like

I hope someday it works for youtube of the smart tv, as it does in windows