Adblock support thread


#528

Sorry it took so long, here's the output of /etc/config/dhcp -

~# cat /etc/config/dhcp

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.auto'
	option nonwildcard '1'
	option localservice '1'
	list rebind_domain 'plex.direct'

config dhcp 'lan'
	option interface 'lan'
	option start '100'
	option limit '150'
	option leasetime '12h'
	option dhcpv6 'server'
	option ra 'server'

config dhcp 'wan'
	option interface 'wan'
	option ignore '1'

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

config dhcp 'Guest'
	option start '100'
	option interface 'Guest'
	option limit '110'
	option leasetime '4h'

And nslookup form a connected client -

~# nslookup doubleclick.net
Server:		127.0.0.1
Address:	127.0.0.1#53

Name:      doubleclick.net
Address 1: 172.217.12.46
Address 2: 2607:f8b0:4000:815::200e

#529

What a pity - it's a bug in 3.5.5 ... to fix it manually, add in the section "config dnsmasq" the following option:

option serversfile '/tmp/adb_list.overall'

After that restart dnsmasq. I'll push 3.5.5v2 in a few minutes - sorry.


#530

That got it working, thanks for your help and all your your hard work on Adblock, it's much appreciated.


#531

Thanks for your report. The bugfix version (3.5.5v2) is now in snapshot & 18.06 repo.


#532

now i could see why adblock was not working :thinking:

after adding option serversfile '/tmp/adb_list.overall' to /etc/config/dhcp , adblock starts blocking ads :hugs:

still there is issue with adblock logs not showing and reason i could not see why adblock was not working.

thanks for the hard work on 'adblock' :+1:


#533

Tried adding domains to the blacklist, I can still access those domains after saving (and suspending/starting adblock)
Any idea why? The builtin lists seems to work fine however.


#535

A newbie here.. Somehow I miss something on blocking ads. Output of configuration file has been listed below. Could you let me know, where I am wrong ?

root@OpenWrt:/etc/config# ip r
default via 192.168.1.1 dev wlan0  src 192.168.1.8
192.168.0.0/19 dev wlan0 scope link  src 192.168.1.8
192.168.2.0/25 dev br-lan scope link  src 192.168.2.1

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

config dnsmasq
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option expandhosts '1'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.auto'
        option nonwildcard '1'
        option localservice '1'
        option serversfile '/tmp/adb_list.overall'
        option domain 'home'

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option force '1'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'

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

config dnsmasq
        option serversfile '/tmp/adb_list.overall'
        option rebind_protection '0'
        option localservice '0'
        option nonwildcard '0'
        option authoritative '1'

root@OpenWrt:/etc/config#

C:\>nslookup doubleclick.net
Server:  OpenWrt
Address:  192.168.2.1

Non-authoritative answer:
Name:    doubleclick.net
Addresses:  2404:6800:4003:80c::200e
          172.217.27.46

#536

What are the first two configuration blocks of /etc/config/adblock?


#537

You have defined multiple dnsmasq instances, is this intended (2x 'config dnmasq')? If so, please use named sections, e.g. config dnsmasq 'main' and config dnsmasq 'guest', if not please remove the second section.

Also please provide the output of /etc/init.d/adblock status


#538

Whenever you add domains to your blacklist you have to restart adblock processing ("refresh" button in LuCI), suspend/resume did not refresh your list content.


#539

I fixed it, I thought the firmware I use had it configured from scratch but I had to add the serversfile to /etc/config/dhcp. I don't know why it appered to be working at first, maybe funky browser cache.


#540

I have removed second section and requested output in below.

root@OpenWrt:/etc/config# /etc/init.d/adblock status
::: adblock runtime information
  + adblock_status  : enabled
  + adblock_version : 3.5.5-2
  + overall_domains : 0 (normal mode)
  + fetch_utility   : -
  + dns_backend     : dnsmasq (/tmp)
  + last_rundate    : 10.09.2018 10:49:35
  + system_release  : GL.iNet GL-AR150, OpenWrt 18.06.1 r7258-5eb055306f
root@OpenWrt:/etc/config#

#541

Another question tho', there seems to be a limit on how many domains you can blacklist under the advanced section?


#542

Yep, the used LuCI SimpleForm is limited to 100KB (to guarantee good response times)! If you really need bigger white-/blacklist, you can edit those files directly in a terminal session.


#543

The download utility configuration seems to be borked, therefore your blocklist is currently empty. Please check /etc/config/adblock, the global section must contain a valid 'adb_fetchutil' option, e.g.:

option adb_fetchutil 'uclient-fetch'

Also enable the debug logging, restart adblock and check the logs afterwards (logread -e "adblock")


#545

Thank you so much, 'logread -e adblock' was mentioning fetch was failing due to SSL, installed libustream-openssl and then performed referesh -> adblock started working,


#546

(edit) I'm trying to block some of the youtube ads. (/edit)
I'm doing something (probably something obvious) wrong here. Config file:

root@LEDE:/tmp# tail /etc/config/adblock
        option adb_src_rset '/^([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}'
        option adb_src_desc 'focus on zeus botnet by abuse.ch, daily updates, approx. 400 entries'
        option enabled '0'

config source 'youtube'
        option adb_src 'https://api.hackertarget.com/hostsearch/?q=googlevideo.com'
        option adb_src_rset 'BEGIN{FS=\",\"}/^(r[0-9]+\.){1,1}([[:alnum:]_-]+\.)+[[:alpha:]]+/{sub(/\./,\"---\");print tolower(\$1)}'
        option adb_src_desc 'focus on youtube ad-related subdomains, dynamic request API, approx. 180 entries'
        option enabled '1'

adblock status:

root@LEDE:/tmp# /etc/init.d/adblock status
::: adblock runtime information
  + adblock_status  : enabled
  + adblock_version : 3.5.4-2
  + overall_domains : 3991 (normal mode)
  + fetch_utility   : /bin/uclient-fetch (libustream-ssl)
  + dns_backend     : dnsmasq (/tmp)
  + last_rundate    : 15.09.2018 14:10:57
  + system_release  : Linksys WRT1900ACS, OpenWrt 18.06.1 r7258-5eb055306f

fetch list of domains manually:

root@LEDE:/tmp# uclient-fetch -O - https://api.hackertarget.com/hostsearch/?q=googlevideo.com
Downloading 'https://api.hackertarget.com/hostsearch/?q=googlevideo.com'
Connecting to 13.68.211.181:443
Writing to stdout
googlevideo.com,172.217.12.196
r4.sn-nx5e6n76.googlevideo.com,173.194.152.42
(etc)

But, ...

root@LEDE:/tmp# nslookup r4.sn-nx5e6n76.googlevideo.com
Server:         127.0.0.1
Address:        127.0.0.1#53

Name:      r4.sn-nx5e6n76.googlevideo.com
Address 1: 173.194.152.42
Address 2: 2607:f8b0:400a:12::a

and yet ...

root@LEDE:/tmp# nslookup www.doubleclick.net
Server:         127.0.0.1
Address:        127.0.0.1#53

** server can't find www.doubleclick.net: NXDOMAIN
** server can't find www.doubleclick.net: NXDOMAIN

What am I doing wrong? Regards, Stephen


#547

Nothing ... youtube don't request the dot separated domain names, therefore the adblock awk import replace the "." with three "---", e.g. a current youtube log:

youtube

Anyway, you can't reliable block ads on youtube on dns level. Like facebook this is a combined ad & content platform and both parts are often referring to the same sources.


#548

Thanks for that didbot. Sorry for the slow reply. Like others have noted, youtube changed something recently and adverts are appearing more often than they used to. Regards, S


#549

Apologies if I missed this in the thread - it’s getting quite large!

Is there any way to get stats from Adblock- number blocked, top entries etc?