Adblock support thread

Must be some file i need to clear maybe, I get:

:::
::: results for domain 'raw.githubusercontent.com'
:::
  + raw.githubusercontent.com
:::
::: results for domain 'githubusercontent.com'
:::
  + raw.githubusercontent.com

You haven't enabled adblock backups, with backups in place you will see something like this:

query

I made some progress, however a few errors still remain.
Will /usr/bin/adblock.sh free the shell prompt and move to background if successfully running?
I want to use the whitelist feature so believe I need to use the later versions.
I had 3.1 working on BB.

root@OpenWrt:~# /usr/bin/adblock.sh 
adblock instance started ::: action: start, priority: 0, pid: 22470
user.info adblock-3.6.3[22470]: blocklist with overall 2 domains loaded successfully (AWF-5G, OpenWrt Barrier Breaker unknown)

root@OpenWrt:~# /etc/init.d/adblock status
::: adblock runtime information
/etc/rc.common: line 138: json_load_file: not found

nslookup shows the domain blocking is not working.

Oh sorry, my mistake.
It was adb_list.urlhaus.gz.... I'll remove that list, didn't really trust it in the first place.
I really like the new features, good job!
Perhaps you could add a note in the luci-app that backups need to be enabled to get the full functionallity.

@dibdot Thanks to your help, I was able to run version 3.5.0 successfully on BB.
blacklist worked so basic things are in place.
However I am not able to use the whitelist feature.
I emptied adblock.blacklist and added a domain in adblock.whitelist and restarted the app.
However I don't see this file getting generated: /tmp/adb_list.jail
Any directions please?

root@OpenWrt:/tmp# /etc/init.d/adblock status
::: adblock runtime information
  + adblock_status  : enabled
  + adblock_version : 3.5.0
  + overall_domains : 0 (normal mode)
  + fetch_utility   : /usr/bin/uclient-fetch (libustream-ssl)
  + dns_backend     : dnsmasq (/tmp)
  + last_rundate    : 16.01.2019 12:35:24

extra option 'adb_jail' in adblock config enabled? Default is '0', enabled is '1'.

Edit: If you're only interested in the restrictive 'jail' list, it might be easier to maintain that list manually, see here

I didn't find adb_jail in adblock.conf in version 3.5.0 when this feature is first added.

It's not a mandantory option, therfore not part of the stock config. Usually the setup is done via LuCI ... you should always consult the online readme, here the link for 3.5.0: https://github.com/openwrt/packages/blob/c44e40809eb30e937e390b541807515ed594b664/net/adblock/files/README.md

1 Like

So i enabled adb_jail option and restarted.
whiltelist is not working. All sites are accessible.
Here are some outputs, if it helps.

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

config dnsmasq
	option domainneeded '1'
	option boguspriv '1'
	option filterwin2k '0'
	option localise_queries '1'
	option rebind_protection '1'
	option rebind_localhost '1'
	option local '/lan/'
	option domain 'lan'
	option expandhosts '1'
	option nonegcache '0'
	option authoritative '1'
	option readethers '1'
	option leasefile '/tmp/dhcp.leases'
	option resolvfile '/tmp/resolv.conf.auto'
	option serversfile '/tmp/adb_list.overall'

root@OpenWrt:~# cat /tmp/adb_list.overall 
root@OpenWrt:~# cat /tmp/adb_list.jail 
server=/rediff.com/#
server=/#/
root@OpenWrt:~# /etc/init.d/adblock status
::: adblock runtime information
  + adblock_status  : enabled
  + adblock_version : 3.5.0
  + overall_domains : 0 (normal mode)
  + fetch_utility   : /usr/bin/uclient-fetch (libustream-ssl)
  + dns_backend     : dnsmasq (/tmp)
  + last_rundate    : 16.01.2019 20:46:10

Sorry with historic releases like BB you are on your own, no more input from my side (maybe others chime in).

Thank you for your work and the great addon.
I'm on the latest snapshot release (3.6.3) and everything works great.

I noticed, however, that the report function only evaluates a certain time interval.
The router is already running for one day. Do you know which option this affects?

root@LEDE:~# /etc/init.d/adblock report
:::
::: Adblock DNS-Query Report
:::
  + Start    ::: 2019-01-17, 05:02:32
  + End      ::: 2019-01-17, 06:36:03
  + Total    ::: 200
  + Blocked  ::: 0 (0.00 %)
:::
root@LEDE:~# uptime
 08:28:24 up 1 day,  3:27,  load average: 0.06, 0.07, 0.07

Hey!

First of all thanks for this adblock, great work! :slight_smile:
I need your help, I'm using adblock_version : 3.5.5-4
and facing those two issues.

First problem,
I cannot send pic/vids/gifs etc with viber with none of my devices. (I can receive though without problems.)
I went to advanced / query and searched for www.viber.com and found the following which I whitelisted.
www.viber.com
viber.com
ads.viber.com
ads-d.viber.com
ads.aws.viber.com
After many adblock restarts some times I may be able to run viber without problems but if for some reason I have to rr my router then again viber is blocked.
Is there any way to find out the exact time I'm trying to send something, what is been blocked?

Second problem is that very often I'm getting Youtube ads in my TV.
is there any way I can turn off Youtube ads entirely?

Thanks for your time in advance.

Please provide the following information, see here

Thanks!

Since release 3.6.x "yes" via Report Engine, this release will be part of OpenWrt 19.x.

No ... search this thread for youtube.

I love the new reporting feature; however, it appears to simply report queries that result in an NXDOMAIN. Unfortunately, this ends up with misleading information in the "Latest DNS Queries" panel.

In my specific example, we use Zoom conferencing. There is apparently a bug in the code where it repeatedly tries to resolve gateway-s.zoom.us. As of now, in my report, I have 2,234 attempts and several entries in the Latest DNS Queries with a "Whitelist" button next to them.

I saw this and had already whitelisted zoom.us, so I thought it was odd; however, thinking this might be causing issues with Zoom, I hit the Whitelist button and continued to see NXDOMAIN reports. I reloaded the blacklists with the same results. I finally restarted the router and still saw the same behavior. Suspecting there might be some other cause, I finally queried the Google DNS servers and found that gateway-s.zoom.us doesn't exist.

Would it be possible to:

  • Cross-reference the Top 10 panel against the blacklist and only flag queries in the Blocked Domains column that are explicitly blacklisted?
  • Do the same cross-referencing in the Latest Queries panel, but instead of a button, put a message along the lines of "unknown host"?

This would clean up the report a bit and would also save some hunting on the part of admins trying to figure out the source of an issue.

No, that data comes from a detached tcpdump process without fancy (pre-)filter capabilities. To quickly find out NX domains which are not adblock related, just use the domain query: if the query doesn't find the blocked domain (e.g., 'gateway-s.zoom.us') than the NX is unrelated to adblock.

Edit: Said that, maybe it's useful to pull out the "Query domains" tab out of the advanced tab and place it beside the "DNS Query Report"!? Thoughts?

hi dibdot!
i get the following message, if i want a report in cli:
/etc/init.d/adblock report
Error relocating /usr/bin/sort: explicit_bzero: symbol not found
Error relocating /usr/bin/sort: explicit_bzero: symbol not found

Other issue:
i dont have the new database query window in luci (see image).
adblock

My log: 
Sat Jan 19 10:30:31 2019 user.debug adblock-3.6.3[7235]: f_report ::: action: report, report: 1, search: +, count: 50, filter: false, print: true, reputil: /usr/sbin/tcpdump, repdir: /mnt/data/adblock, repiface: br-lan, replisten: 53, repchunksize: 1, repchunkcnt: 5, bg_pid: 6175
Sat Jan 19 10:32:25 2019 user.debug adblock-3.6.3[7324]: f_report ::: action: restart, report: 1, search: +, count: 50, filter: false, print: false, reputil: /usr/sbin/tcpdump, repdir: /mnt/data/adblock, repiface: br-lan, replisten: 53, repchunksize: 1, repchunkcnt: 5, bg_pid:
Sat Jan 19 10:32:26 2019 user.debug adblock-3.6.3[7324]: f_hash   ::: hash_util: /usr/bin/sha256sum, hash: a72f00020c7ce06be3d72c8b65ee53ab4077df63e141c68c6a855d5338221868, out_rc: 1
Sat Jan 19 10:32:26 2019 user.debug adblock-3.6.3[7324]: f_hash   ::: hash_util: /usr/bin/sha256sum, hash: 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b, out_rc: 1
Sat Jan 19 10:32:33 2019 user.debug adblock-3.6.3[7324]: f_dnsup  ::: cache_util: -, cache_rc: -, cache_flush: 1, cache_cnt: 0, rc: 0
Sat Jan 19 10:32:33 2019 user.debug adblock-3.6.3[7324]: f_rmdns  ::: dns: dnsmasq, dns_dir: /tmp, dns_prefix: adb_list, dns_file: adb_list.overall, rt_file: /tmp/adb_runtime.json, backup_dir: /mnt/data/adblock
Sat Jan 19 10:32:33 2019 user.info adblock-3.6.3[7324]: adblock instance started ::: action: restart, priority: 0, pid: 7324
Sat Jan 19 10:32:34 2019 user.debug adblock-3.6.3[7324]: f_jsnup  ::: status: running, mode: normal mode, cnt: , notify: 1, notify_cnt: 25000, notify_pid: -
Sat Jan 19 10:32:34 2019 user.debug adblock-3.6.3[7324]: f_uci    ::: config: dhcp, change:
Sat Jan 19 10:32:34 2019 user.debug adblock-3.6.3[7324]: f_uci    ::: config: firewall, change:
Sat Jan 19 10:32:34 2019 user.debug adblock-3.6.3[7324]: f_main   ::: dns: dnsmasq, fetch_util: /bin/uclient-fetch (libustream-ssl), backup: 1, backup_mode: 0, dns_jail: 0, force_dns: 0, mem_total: 60, mem_free: 29, max_queue: 8
....
Sat Jan 19 10:33:02 2019 user.debug adblock-3.6.3[7324]: f_jsnup  ::: status: enabled, mode: normal mode, cnt: 38824, notify: 1, notify_cnt: 25000, notify_pid: -
Sat Jan 19 10:33:02 2019 user.info adblock-3.6.3[7324]: blocklist with overall 38824 domains loaded successfully (TP-Link TL-WR1043N/ND v3, OpenWrt 18.06.1 r7258-5eb055306f)
Sat Jan 19 10:34:10 2019 user.debug adblock-3.6.3[8014]: f_report ::: action: report, report: 1, search: +, count: 50, filter: false, print: true, reputil: /usr/sbin/tcpdump, repdir: /mnt/data/adblock, repiface: br-lan, replisten: 53, repchunksize: 1, repchunkcnt: 5, bg_pid: 7353

Thanks!

I upgraded to 3.6.x and found some extra viber queries and it seems now that is working.
Will post back if it is not.

Will do.

Thank you for your swift replies :slight_smile:

Said that, maybe it's useful to pull out the "Query domains" tab out of the advanced tab and place it beside the "DNS Query Report"!? Thoughts?

Hmm... So, here's my dilemma with that: I did, in fact, check the Query Domains tab and saw a "+" next to zoom.us. The issue I've run into in the past was where I would see domains blocked in spite of the fact that Query Domains shows them as being whitelisted, so I tend not to trust the results that come back from that tab. I was running into this exact issue with ProofPoint (I believe the domain is proofpoint.net), where Query Domains showed it whitelisted but it was still being blocked (I had added proofpoint.net on the Whitelist tab). It appears the Query Domains mechanism doesn't check to make sure the live rpz database is up-to-date and consistent with the white/blacklists, so reality can be inconsistent with the Query Domains results. I've struggled with this on numerous occasions trying to update the live database and it seems to be exacerbated with the "backup" checkbox being checked.

Given this, if my perception about how Query Domains works is correct (that it's not searching /var/lib/bind/adb_list.overall), perhaps the true fix would be to make the overall manual whitelisting process more intuitive. I should mention that I'm using a full bind DNS server on my OpenWRT instance.

If I'm incorrect as to how all of this works and my perception is wrong, my apologies. I love the adblock package and the new reporting feature is really nice. It's just that the process of adding a domain to the Whitelist tab has always been a source of frustration and it's never been clear how to update the live rpz database, short of (possibly) restarting adblock from the cli--and that's even iffy with the backup feature.

Thanks for the report. Never seen such error, probably an out of memory condition. Please save report-data & backup files on an external USB-Stick and not on "/tmp" (which references by default to your routers tmpfs).

please reset your LuCI cache (rm -rf /tmp/luci-*)