Adblock (4.4.2-r3) ignores etc/adblock/adblock.blocklist?

Hi, I just upgraded to OpenWrt 24.10.4 and installed latest adblock 4.4.2-r3.
It looks like /etc/adblock/adblock.blocklist is now ignoerd and any domain listed there is ignored (not blocked).
Was there any recent change that requires additional steps to make /etc/adblock/adblock.blocklist work?

UPDATE: as a matter of fact none of the domains are really blocked. Not even the one in active_feeds

Also, I noticed when installing adblock I got these errors - maybe this is the reason?


root@OpenWrt:~# opkg install adblock
Installing adblock (4.4.2-r3) to root...
Downloading ``https://downloads.openwrt.org/releases/24.10.4/packages/mipsel_24kc/packages/adblock_4.4.2-r3_all.ipk
Configuring adblock.
uci: Parse error (invalid character in name field) at line 67, byte 27
uci: Parse error (invalid command) at line 1, byte 0


logread keeps showing these errors:



logread -e "adblock"
Mon Dec 15 19:44:02 2025 daemon.err adblock.sh[4715]: Failed to parse json data: unexpected end of data
Mon Dec 15 19:44:02 2025 daemon.err adblock.sh[4715]: Failed to parse json data: unexpected end of data


Eventually, it starts and it seems like it should block 266 882 domains but none of the domains are blocked


root@OpenWrt:/etc/adblock# /etc/init.d/adblock status
::: adblock runtime information
  + adblock_status  : enabled
  + adblock_version : 4.4.2-r3
  + blocked_domains : 266 882
  + active_feeds    : adaway, adguard, bitcoin, certpl, disconnect, openphish, phishing_army, reg_pl, yoyo
  + dns_backend     : dnsmasq (2.90-r4), -, 4.50 MB
  + run_ifaces      : trigger: -, report: -
  + run_directories : base: /tmp, dns: , backup: /tmp/adblock-backup, report: /tmp/adblock-report, jail: /tmp
  + run_flags       : shift: ✘, custom feed: ✘, force: ✘, flush: ✘, tld: βœ”, search: ✘, report: ✘, mail: ✘, jail: ✘
  + last_run        : mode: restart, 2025-12-15T19:44:52+00:00, duration: 0m 37s, 21.57 MB available
  + system_info     : cores: 2, fetch: uclient-fetch, Netgear R6220, ramips/mt7621, OpenWrt 24.10.4 r28959-29397011cc 

Sounds like an error in your /etc/config/adblock file. What's in it?

Hi @dave14305
Thanks for quick reply.

Here is the content of it:

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

config adblock 'global'
	option adb_enabled '1'
	option adb_debug '1'
	option adb_safesearch '0'
	option adb_mail '0'
	option adb_report '0'
	option adb_dns 'dnsmasq'
	option adb_lookupdomain 'duckduckgo.com'
	option adb_dnstimeout '60'
	option adb_dnsforce '0'
	option adb_fetchcmd 'uclient-fetch'
	option adb_nicelimit '0'
	list adb_feed 'adaway'
	list adb_feed 'adguard'
	list adb_feed 'bitcoin'
	list adb_feed 'certpl'
	list adb_feed 'disconnect'
	list adb_feed 'openphish'
	list adb_feed 'phishing_army'
	list adb_feed 'yoyo'

OK, maybe it's something else. Do you get an error running uci export

Ya, there is one:
BTW. I added an UPDATE to my opening post - none of the domains are really blocked. Not even the one in active_feeds.

# uci export
package adblock

config adblock 'global'
	option adb_enabled '1'
	option adb_debug '1'
	option adb_safesearch '0'
	option adb_mail '0'
	option adb_report '0'
	option adb_dns 'dnsmasq'
	option adb_lookupdomain 'duckduckgo.com'
	option adb_dnstimeout '60'
	option adb_dnsforce '0'
	option adb_fetchcmd 'uclient-fetch'
	option adb_nicelimit '0'
	list adb_feed 'adaway'
	list adb_feed 'adguard'
	list adb_feed 'bitcoin'
	list adb_feed 'certpl'
	list adb_feed 'disconnect'
	list adb_feed 'openphish'
	list adb_feed 'phishing_army'
	list adb_feed 'reg_pl'
	list adb_feed 'yoyo'

package adblock-opkg

config adblock 'global'
	option adb_enabled '1'
	option adb_debug '0'
	option adb_dnsforce '0'
	option adb_dnsshift '0'
	option adb_safesearch '0'
	option adb_mail '0'
	option adb_report '0'
	list adb_feed 'adguard'
	list adb_feed 'adguard_tracking'
	list adb_feed 'certpl'

uci: Parse error (invalid character in name field) at line 67, byte 27
package dropbear

OK, try to see what's wrong in the dropbear config:

cat /etc/config/dropbear

Hmm… not really much here. This config is kept like that for long years:

# cat /etc/config/dropbear
config dropbear
	option PasswordAuth 'off'
	option Port         '22'
#	option BannerFile   '/etc/banner'

I get also error for

uci: Parse error (invalid command) at line 1, byte 0
package snmpd-opkg

At least one of your uci config files includes invalid chars. Just narrow down the culprit config with this one liner ...

for file in ls /etc/config/*;do uci show $file;done
1 Like

TY @dibdot that did a trick :slight_smile:

Here are culprits :sweat_smile:
As a matter of fact one culprit as the typo in dhcp was preventing adblock to work:

root@OpenWrt:/etc/config# for file in $(ls -1 /etc/config/*);do echo "---start: $file---"; uci show $file; echo "---end---";done

---start: /etc/config/dhcp---
uci: Parse error (invalid character in name field) at line 67, byte 27
---end---

...

---start: /etc/config/snmpd---
uci: Parse error (invalid command) at line 1, byte 0
---end---

Only an idea to consider:

  • to add to adblock startup a validation on /etc/config/dhcp
  • to show in /etc/init.d/adblock status that although it is β€œenabledβ€œ it is not functioning as /etc/config/dhcp inconsistent (or just set status to failed).

Cheers
Czezz

2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.