Adblock support thread

Is there any reason not to just install the later Adblock on 18.x.x? I've been running it on 18.06.4, apparently fine.

No, most probably it will just run fine ... I just don't have enough spare time to properly support older releases.

I am too running the latest adblock on 18.06.2 but with the old luci-app-adblock. which works fine, but of course, does not have reports.
the last time I tried to install the snapshot version of luci-app-adblock it somehow messed up the whole gui.
@JonP: do you have reports 18.06.4?
edit: nevermind. just tried - works fine. welcome back reports!

I think I remember, I had issues too till I removed and reinstalled everything. Helps to remember to get the LUCI interface up to same version, I did that as well... :roll_eyes:

Can it block by IP address? If not can you recommend something that can download a list of IP's and block them?

Nope, adblock is solely dns based. To block via IP look here: banIP support thread

1 Like

hi can anyone help me, everytime i try to switch my DNS backend to Unbound i always get an Error Status on the Adblock luci and when i check the system log it give me the following reports.

Mon Oct 28 04:21:55 2019 user.err adblock-3.8.6-2[18057]: dns backend 'unbound' not running or executable
Mon Oct 28 04:21:55 2019 daemon.err adblock.sh[18057]: /usr/bin/adblock.sh: line 317: can't create /var/lib/unbound/adb_list.overall: nonexistent directory
Mon Oct 28 04:21:55 2019 user.err adblock-3.8.6-2[18057]: Please also check 'https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md'
Mon Oct 28 04:25:00 2019 user.notice unbound: default protocol configuration
Mon Oct 28 04:25:00 2019 user.notice unbound: default memory configuration
Mon Oct 28 04:25:00 2019 user.notice unbound: default recursion configuration
Mon Oct 28 04:25:25 2019 daemon.info procd: Instance unbound::unbound s in a crash loop 6 crashes, 1 seconds since last crash
Mon Oct 28 04:25:38 2019 user.err adblock-3.8.6-2[18788]: dns backend 'unbound' not running or executable
Mon Oct 28 04:25:38 2019 user.err adblock-3.8.6-2[18788]: Please also check 'https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md'

i have unbound-control installed so i'm not sure if im doing anything wrong.

Please make sure that your unbound installation works OK without adblock. If so you didn't use the usual unbound directory structure and you need to change 'adb_dnsdir' in your adblock config as well (should point to your main unbound runtime directory).

1 Like

Does adblock use files under a folder like /tmp/tmp.filMID/ after it starts up? Looks like those are temporary files and some RAM could be saved if they are removed.

ls -l /tmp/adb_* /tmp/tmp.filMID/
-rw-r--r--    1 dnsmasq  root      19990384 Oct 30 20:19 /tmp/adb_list.overall
-rw-r--r--    1 root     root           396 Oct 30 20:19 /tmp/adb_runtime.json

/tmp/tmp.filMID/:
-rw-r--r--    1 root     root      21765337 Oct 30 20:08 tmp.jOgFAC.blacklist

That's OK, the latter one is the json status file ... and the first one is the blocklist file used by the dns backend. Said that, if you use adblock 3.8.x you can enable the extra option 'DNS File Reset' in the LuCI frontend to wipe this file after dns backend load (adblock takes care to re-generate this file whenever the dns backend reloads).

That's a bug caused by multiple start/restart/reload commands in parallel. This will be fixed with this PR (not merged yet): https://github.com/openwrt/packages/pull/10406

1 Like

I might be mis-understanding how this is supposed to work, but the contents of /etc/adblock/adblock.blacklist is always used no matter if the blacklist - static local domain blacklist, always deny these domains is enabled or disabled.

Which adblock version? In 3.8.x you can't enable/disable the black- and whitelist anymore, they're always enabled ...

Hmm, so I see that I still have blacklist filter in my config file, but it is missing in the default one. That would do it.
Is there a way to automatically pickup the changes without having to hunt for them?

Hi. Latest versions (versions >3.8.6-2) not working here.

[root@OpenWrt ~]# /etc/init.d/adblock status
::: adblock runtime information
  + adblock_status  : enabled
  + adblock_version : 3.8.6-2
  + overall_domains : 62050
  + fetch_utility   : /bin/uclient-fetch (libustream-ssl)
  + dns_backend     : unbound, /var/lib/unbound
  + dns_variant     : nxdomain, false
  + backup_dir      : /mnt
  + last_rundate    : 03.11.2019 15:32:42
  + system_release  : TP-Link Archer C7 v2, OpenWrt SNAPSHOT r11396-5f108bbc58


[root@OpenWrt ~]# cat /etc/adblock/adblock.blacklist
(...)
firebaseremoteconfig.googleapis.com
mobilecrashreporting.googleapis.com
logz.io
izatcloud.net
(..)

[root@OpenWrt ~]# nslookup firebaseremoteconfig.googleapis.com
Server:		127.0.0.1
Address:	127.0.0.1#53

** server can't find firebaseremoteconfig.googleapis.com: NXDOMAIN
** server can't find firebaseremoteconfig.googleapis.com: NXDOMAIN
[root@OpenWrt ~]# nslookup logz.io
Server:		127.0.0.1
Address:	127.0.0.1#53

** server can't find logz.io: NXDOMAIN
** server can't find logz.io: NXDOMAIN

[root@OpenWrt ~]# cat /var/lib/unbound/adb_list.overall |grep lemonparty
local-zone: "lemonparty.biz" static
local-zone: "lemonparty.org" static

[root@OpenWrt ~]# nslookup lemonparty.org
Server:         127.0.0.1
Address:        127.0.0.1#53

** server can't find lemonparty.org: NXDOMAIN
** server can't find lemonparty.org: NXDOMAIN

--

[root@OpenWrt ~]# /etc/init.d/adblock status
::: adblock runtime information
  + adblock_status  : enabled
  + adblock_version : 3.8.8
  + overall_domains : 62050
  + fetch_utility   : /bin/uclient-fetch (libustream-ssl)
  + dns_backend     : unbound, /var/lib/unbound
  + dns_variant     : nxdomain, false
  + backup_dir      : /mnt
  + last_rundate    : 03.11.2019 16:16:32
  + system_release  : TP-Link Archer C7 v2, OpenWrt SNAPSHOT r11396-5f108bbc58

[root@OpenWrt ~]# cat /etc/adblock/adblock.blacklist
(...)
firebaseremoteconfig.googleapis.com
mobilecrashreporting.googleapis.com
logz.io    
izatcloud.net
(...)

[root@OpenWrt ~]# nslookup firebaseremoteconfig.googleapis.com
Server:		127.0.0.1
Address:	127.0.0.1#53

Name:      firebaseremoteconfig.googleapis.com
Address 1: 172.217.28.10
Address 2: 2800:3f0:4001:800::200a
[root@OpenWrt ~]# nslookup logz.io
Server:		127.0.0.1
Address:	127.0.0.1#53

Name:      logz.io
Address 1: 23.185.0.3
Address 2: 2620:12a:8000::3
Address 3: 2620:12a:8001::3

[root@OpenWrt ~]# nslookup lemonparty.org
Server:		127.0.0.1
Address:	127.0.0.1#53

Name:      lemonparty.org
Address 1: 104.24.107.94
Address 2: 104.24.106.94
Address 3: 2606:4700:30::6818:6a5e
Address 4: 2606:4700:30::6818:6b5e

Thanks.

Hi, can't reproduce such issues. Please check the (debug) logs and wait for an official 3.8.8 adblock package.

1 Like

Yep, re-install the package with the "--force-maintainer" opkg option, to update/overwrite your existing config with the default one.

When I comment out the 4 lines of code below(versions >3.8.6-2):

if [ -s "${adb_pidfile}" ] && [ "${action}" != "help" ] && [ "${action}" != "status" ]
then
	exit 1
fi

It works great again.
Thanks.

That is an override, not a merge....

Does the /tmp/adb_list,overall file get created when adblock starts and registers for events after a reboot or when the wan trigger is fired?

Thanks to dibdot for fixing the Unbound integration!

1 Like