Adblock not working

I have trouble getting Adblock to work. Yesterday I installed the package incl. luci app on a freshly reset installation of OpenWRT.
It's supposed to work without further configuration I understand.
But it's not really blocking anything.
Although it shows
Status / Version
enabled / 4.1.4
Blocked Domains
In DNSmasq I have configured external downstream DNS servers.

Strange thing is it first seemed to work and then stopped working.

This part is a little ambiguous. If you hand out external DNS servers as part of your DHCP lease, those will circumvent adblock running on your router's IP(s).

1 Like

But when I don't enter DNS servers in dnsmasq I get no connection to no website it seems..
So this is not correct to set DNS forwardings in DNSMASQ?

Generated by NetworkManager
search lan

I post some info about adblock config:

root@OpenWrt:~#  uci show adblock'0''0''0''0''1''dnsmasq''wget''android_tracking' 'energized' 'firetv_tracking' 'smarttv_tracking' 'stevenblack''0''0''1''hosts'

config dnsmasq
	option domainneeded '1'
	option localise_queries '1'
	option rebind_protection '1'
	option rebind_localhost '1'
	option local '/lan/'
	option domain 'lan'
	option expandhosts '1'
	option authoritative '1'
	option readethers '1'
	option leasefile '/tmp/dhcp.leases'
	option resolvfile '/tmp/resolv.conf.d/'
	option localservice '1'
	option ednspacket_max '1232'
	option confdir '/tmp/dnsmasq.d'
	list server ''

config dhcp 'lan'
	option interface 'lan'
	option start '100'
	option limit '150'
	option leasetime '12h'
	option dhcpv4 'server'
	option dhcpv6 'server'
	option ra 'server'
	list ra_flags 'managed-config'
	list ra_flags 'other-config'

config dhcp 'wan'
	option interface 'wan'
	option ignore '1'
	option start '100'
	option limit '150'
	option leasetime '12h'

config odhcpd 'odhcpd'
	option maindhcp '0'
	option leasefile '/tmp/hosts/odhcpd'
	option leasetrigger '/usr/sbin/odhcpd-update'
	option loglevel '4'

you should probably set dnsmasq to forward the dns requests to your local adblock ?

1 Like

In case I forward to local I get the same result as not forwarding:

Thu Sep 29 14:34:31 2022 adblock-4.1.4[6758]: download of 'android_tracking' failed, url:, rule: /^([[:alnum:]_-]{1,63}\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}, categories: -, rc: 4, log: --2022-09-29 14:34:26-- Resolving failed: Try again. wget: unable to resolve host address ''

there's a diff between setting the DNS for the clients, and the router....

1 Like

I don't know how to proceed. Any thoughts?

set your router to use your ISPs DNS servers.

set your clients to use the router's LAN IP as DNS, and hope the adblock works as intended, via dnsmasq.

I see in the report that some DNS queries indeed going through the Adblock and few are getting blocked. But not all that are in the blocklist. What can be the reason?

have you disabled DoH in your browsers, DoT on your Android devices,
and blocked all hardcoded DNSes in the apps ?

1 Like

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