Adblock support thread

Does this mean that adblock pkg now will have coreuitls dependency? Or, will adblock be updated to use new sort from updated busybox?

Unfortunately the UI gives no indication that openwrt is not a rolling release distro, and package updates are not validated against earlier releases. Generally you should not update packages unless there is advice to do so because of a serious issue.

adblock does depend on coreutils-sort.

This is what happened to you:

  1. You installed adblock and coreutils-sort was installed as a dependency
  2. Adblock was working well
  3. You updated busybox, this replaces /usr/bin/sort with busybox sort
  4. Adblock no longer works because coreutils sort has been overwritten
  5. You ran opkg install coreutils-sort --force-reinstall
  6. Adblock works again since /usr/bin/sort is once again coreutils-sort

Be careful when updating busybox.. Or, as written in the post above, consider not updating packages at all.

3 Likes

It seems that when I turn on safesearch for google, I stop getting notifications on my android phone for google services (gmail for example). Is it possible there is some URL(s) that google services are trying to reach that gets converted by adblock to a safesearch URL that doesn't actually exist?

It seems like the reg_se list started blocking netflix streams for me... once i disabled that it worked fine again. Took some time to figure that one out...

Probably some temporary human error but still.

Block all domain except the domains in the whitelist using Adblock and Unbound possible?

Does adb_list.jail work on Adblock + Unbound setup? I could not find documentation on how to accomplish it. Maybe it's not possible. I have done it with dnsmasq on a guest dns instance and it was working perfectly. I recently switched to unbound and would like the do the same for the guest network clients. But I am not sure how to do that with unbound. I started reading about unbound views, but I am new to unbound and not really sure how to set it up. Does anyone have any suggestion how I can "block all domain except a few in the whitelist" using adblock + unbound for a guest network?

Need your help to diagnose a very odd case where Adblock fails to load.

I use a BTHH5a with a recent build (Kernel 5.10.96). I use the 5GHz radio as WWAN. When I connect it to the wifi at work, Adblock loads just fine.

However, when I take the BTHH5a to my friends home and connect it to the wifi there, Adblock fails to load with

Fri Feb  4 12:54:45 2022 user.err adblock-4.1.3[3329]: dns backend restart with adblock blocklist failed

The only change I make is to the wireless config so it works when connected to one wifi but not the other.

Full Adblock log:


Fri Feb  4 12:52:22 2022 user.info adblock-4.1.3[3329]: backup directory '/tmp/adblock-Backup' created
Fri Feb  4 12:52:22 2022 user.debug adblock-4.1.3[3329]: f_dns    ::: dns: dnsmasq, dns_dir: /tmp/dnsmasq.d, dns_file: adb_list.overall, dns_user: dnsmasq, dns_inotify: 0, dns_instance: 0, backup: 1, backup_dir: /tmp/adblock-Backup, jail_dir: /tmp
Fri Feb  4 12:52:22 2022 user.debug adblock-4.1.3[3329]: f_fetch  ::: fetch_util: /bin/uclient-fetch, fetch_parm:  --timeout=20 -O
Fri Feb  4 12:52:22 2022 user.info adblock-4.1.3[3329]: adblock instance started ::: action: start, priority: 0, pid: 3329
Fri Feb  4 12:52:22 2022 user.debug adblock-4.1.3[3329]: f_jsnup  ::: status: running, cnt: , mail: 0, mail_service: /etc/adblock/adblock.mail, mail_cnt: 0, mail_pid: -
Fri Feb  4 12:52:22 2022 user.debug adblock-4.1.3[3329]: f_uci    ::: config: dhcp, change:
Fri Feb  4 12:52:23 2022 user.debug adblock-4.1.3[3329]: f_uci    ::: config: firewall, change:
Fri Feb  4 12:52:23 2022 user.debug adblock-4.1.3[3329]: f_temp   ::: tmp_base: /tmp, tmp_dir: /tmp/tmp.efoilC, cores: 2, sort_options: --temporary-directory=/tmp/tmp.efoilC --compress-program=gzip --batch-size=32 --parallel=2, pid_file: /var/run/adblock.pid
Fri Feb  4 12:52:24 2022 user.debug adblock-4.1.3[3329]: f_main   ::: memory: 120/79/61, max_queue: 4, safe_search: 0, force_dns: 0, awk: /usr/bin/awk
Fri Feb  4 12:52:24 2022 user.debug adblock-4.1.3[3329]: f_list   ::: name: iplist, mode: iplist, cnt: 0, in_rc: 0, out_rc: 0
Fri Feb  4 12:52:24 2022 user.debug adblock-4.1.3[3329]: f_list   ::: name: blacklist, mode: blacklist, cnt: 0, in_rc: 0, out_rc: 0
Fri Feb  4 12:52:24 2022 user.debug adblock-4.1.3[3329]: f_list   ::: name: whitelist, mode: whitelist, cnt: 0, in_rc: 0, out_rc: 0
Fri Feb  4 12:52:24 2022 user.debug adblock-4.1.3[3329]: f_list   ::: name: adaway, mode: restore, cnt: 0, in_rc: 4, out_rc: 4
Fri Feb  4 12:52:24 2022 user.debug adblock-4.1.3[3329]: f_list   ::: name: adguard, mode: restore, cnt: 0, in_rc: 4, out_rc: 4
Fri Feb  4 12:52:24 2022 user.debug adblock-4.1.3[3329]: f_list   ::: name: andryou, mode: restore, cnt: 0, in_rc: 4, out_rc: 4
Fri Feb  4 12:52:24 2022 user.debug adblock-4.1.3[3329]: f_list   ::: name: disconnect, mode: restore, cnt: 0, in_rc: 4, out_rc: 4
Fri Feb  4 12:52:34 2022 user.debug adblock-4.1.3[3329]: f_list   ::: name: disconnect, mode: download, cnt: 2735, in_rc: 0, out_rc: 0
Fri Feb  4 12:52:34 2022 user.debug adblock-4.1.3[3329]: f_list   ::: name: disconnect, mode: backup, cnt: 2735, in_rc: 0, out_rc: 0
Fri Feb  4 12:52:40 2022 user.debug adblock-4.1.3[3329]: f_list   ::: name: adaway, mode: download, cnt: 7040, in_rc: 0, out_rc: 0
Fri Feb  4 12:52:41 2022 user.debug adblock-4.1.3[3329]: f_list   ::: name: adaway, mode: backup, cnt: 7040, in_rc: 0, out_rc: 0
Fri Feb  4 12:53:14 2022 user.debug adblock-4.1.3[3329]: f_list   ::: name: adguard, mode: download, cnt: 43446, in_rc: 0, out_rc: 0
Fri Feb  4 12:53:14 2022 user.debug adblock-4.1.3[3329]: f_list   ::: name: adguard, mode: backup, cnt: 43446, in_rc: 0, out_rc: 0
Fri Feb  4 12:53:21 2022 user.debug adblock-4.1.3[3329]: f_list   ::: name: andryou, mode: download, cnt: 58048, in_rc: 0, out_rc: 0
Fri Feb  4 12:53:22 2022 user.debug adblock-4.1.3[3329]: f_list   ::: name: andryou, mode: backup, cnt: 58048, in_rc: 0, out_rc: 0
Fri Feb  4 12:53:24 2022 user.debug adblock-4.1.3[3329]: f_list   ::: name: -, mode: merge, cnt: 101068, in_rc: 4, out_rc: 0
Fri Feb  4 12:53:56 2022 user.debug adblock-4.1.3[3329]: f_tld    ::: source: /tmp/tmp.efoilC/adb_list.overall, cnt: 101068, cnt_tld: 91126
Fri Feb  4 12:54:09 2022 user.debug adblock-4.1.3[3329]: f_list   ::: name: -, mode: final, cnt: 91126, in_rc: 4, out_rc: 0
Fri Feb  4 12:54:45 2022 user.debug adblock-4.1.3[3329]: f_dnsup  ::: dns: dnsmasq, cache_cmd: -, lookup_cmd: /usr/bin/nslookup, lookup_domain: example.com, restart_rc: 0, dns_flush: 0, dns_inotify: 0, dns_timeout: 20, dns_cnt: 21, in_rc: 0, out_rc: 4
Fri Feb  4 12:54:45 2022 user.err adblock-4.1.3[3329]: dns backend restart with adblock blocklist failed
Fri Feb  4 12:55:13 2022 user.debug adblock-4.1.3[3329]: f_dnsup  ::: dns: dnsmasq, cache_cmd: -, lookup_cmd: /usr/bin/nslookup, lookup_domain: example.com, restart_rc: 0, dns_flush: 0, dns_inotify: 0, dns_timeout: 20, dns_cnt: 21, in_rc: 4, out_rc: 4
Fri Feb  4 12:55:13 2022 user.debug adblock-4.1.3[3329]: f_rmtemp ::: tmp_dir: /tmp/tmp.efoilC, src_file: /tmp/adb_sources.json, pid_file: /var/run/adblock.pid
Fri Feb  4 12:55:13 2022 user.debug adblock-4.1.3[3329]: f_rmdns  ::: dns: dnsmasq, status: true, dns_dir: /tmp/dnsmasq.d, dns_file: adb_list.overall, rt_file: /tmp/adb_runtime.json, backup_dir: /tmp/adblock-Backup
Fri Feb  4 12:55:13 2022 user.debug adblock-4.1.3[3329]: f_jsnup  ::: status: error, cnt: 0, mail: 0, mail_service: /etc/adblock/adblock.mail, mail_cnt: 0, mail_pid: -

dns problem not an adblock problem, unless you are looking for a way to bypass dns checks and rely solely on backups or something which is kinda unusual?

Tue Feb  8 04:04:36 2022 user.info adblock-4.1.3[6010]: adblock instance started ::: action: reload, priority: 0, pid: 6010
Tue Feb  8 04:04:40 2022 user.info adblock-4.1.3[6010]: download of 'stalkerware' failed, url: https://raw.githubusercontent.com/astryzia/stalkerware-urls/main/stalkerware_urls.txt, rule: /^([[:alnum:]_-]{1,63}\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}, categories: -, rc: 8, log: Downloading 'https://raw.githubusercontent.com/astryzia/stalkerware-urls/main/stalkerware_urls.txt' Connecting to 185.199.108.133:443 HTTP error 404
Tue Feb  8 04:05:08 2022 user.info adblock-4.1.3[6010]: blocklist with overall 74040 blocked domains loaded successfully (Netgear Nighthawk X4S R7800, OpenWrt SNAPSHOT r18773-04ed224543)

Resource N/A or not found. I’d venture that blocklist no longer exists or has been moved elsewhere?

As I currently experience this issue

and my Adblock is set to start triggered by WAN.
When I try to change the start type to Unspecified (using Luci) the setting will not be saved and return to WAN.
Can I change this via config file to stop restarting of Adblock daemon every few minutes.

Try removing option adb_trigger ‘wan’ from /etc/config/adblock. This should revert it to using a time-based startup.

Restart Adblock.

Hi! I am setting up a keyless entry system for my car with Mercedes Me integration for Home Assistant and a 4G modem. I want to use the jail blacklist and only open for the addresses I have in the whitelist, but I can't seem to get it to work. I have tried blacklisting some domains, and that works as it should, but not the "jail mode". This is what Advanced DNS looks like:


And then I have this as my whitelist (the www.vg.no is a Norwegian newspaper and used as a very reliable ping source for load balancing, so that when the car's at home it will use my wifi instead of 4G):

image

Is there some setting somewhere that I haven't checked?

@RuralRoots
I've tried it. Removed

and restarted Adblock, but Adblock still restarts when

Mon Mar  7 10:36:59 2022 daemon.notice netifd: wan (26606): udhcpc: sending renew to server xx.xx.xx.xx
Mon Mar  7 10:36:59 2022 daemon.notice netifd: wan (26606): udhcpc: lease of xx.xx.xx.117 obtained from xx.xx.xx.1, lease time 3601
Mon Mar  7 10:36:59 2022 user.notice firewall: Reloading firewall due to ifupdate of wan (eth0.2)
Mon Mar  7 10:37:04 2022 user.info adblock-4.1.3[13624]: adblock instance started ::: action: start, priority: 0, pid: 13624

Option changed to Unspecified in Luci but after the last restart option adb_trigger ‘wan’ returned to the config file and in Luci it was set again to WAN.

Bizarre. I have to concur with your experience. I am unable to remove startup trigger interface

I’ve stopped/disabled the process, manually modified the config, only to find the config revert back to it’s previous state when I enable/start the process.

In LuCI, I can change to unspecified, Change/Apply. The entry unspecified remains, but Reload/Restart reverts it back to wan.

@dibdot can you replicate this on 21.02.2 release?

It's a logical glitch in the init script, please comment the section in /etc/init.d/adblock shown below:

service_triggers()
{
	[...]
#	if [ -z "${iface}" ]
#	then
#		. "/lib/functions/network.sh"
#		network_find_wan iface
#		if [ -n "${iface}" ]
#		then
#			uci_set adblock global adb_trigger "${iface}"
#			uci_commit "adblock"
#		fi
#	fi
	[...]

After that set the startup trigger interface to "unspecified" again ...

3 Likes

Nothing on my jail list question? I'm really stuck here. :cry:

ist the dnsmasq instance your main one? To my knowledge the main overall.list gets deployed to /tmp/dnsmasq.d, with your settings, and then dnsmasq takes this list.

The jail.list will be deployed to /tmp and could be user via script that moves it and starts a second dnsmasq instance. You could use it with your primary once, but have to deploy it by hand and deactivate any automatic updates in adblock, so it didn't get overturned by the next overall list, wich must be removed beforehand.
Hope this is kind of right. Good luck with yout setup

Thanks for answering! I have not changed anything in the regular DNS, so I suppose I'm uing dnsmasq, and that's the only instance that's there. I'm afraid I didn't fully understand that... Do you mean that I need to change jail directory from /tmp to /tmp/dnsmasq.d? That didn't change anything for me.

That was my first thought two but now this doesn't work because both paths can't be the same in adb config und if you move the instance path at the top, the instance is no longer recognized.
So what you can do, if you doen't need any automatic updates and only change your whitelistet domains not so often, deactivate the autoupdate depending on interface or time etc.
Put your whitelist domains in gui (whatch out for the right format->manual)
Update list by manually start update. and wait for it to finish
delete overall.list from /tmp/dnsmasq.d
move jail.list to this location
restart dnsmasq with systemctl ot init.d
the last 3 steps could be done via a shellscript (maybe adb has some kind of execution path - i don't know right now).

Now only yout whitelisted domains could be reached from your network.

I can't give any guarantees for this solution, cause that's all from memory. Hope this helps. If someone knows any better please correct me. Would be glad to know a more elegant solution.