Adblock support thread

wrt1900acs v2

it seems that if you have active android tracking in the adblock list, wifi phone it no longer works!

I've got android_tracking enabled on mine and I haven't got any issues with any of our mobile phone/devices. We've got like 9 android devices and 5 iOS devices and no issues while android_tracking enabled on Adblock and using wifi.

And Adblock have nothing to do with Wifi, unless your android device is doing some weird DNS stuffs while trying to connect to your Wifi.

Hello everyone,

I have one issue, and two different results with AdBlock that I can't figure out.

  1. I remove/install adblock, and it immediately shows me ' error/4.1.3'. I'll include logs below
  2. I reboot the router, then under adblock all fields are blank and no matter what i do, it never generates anything in the logs

Device: Turris Omnia
OS Version: 6.1.0

Logs from #1:

Dec 28 18:40:22 turris updater[11669]: updater.lua:92 (Globals): Queue install of luci-i18n-simple-adblock-en/luci/git-22.316.76471-782c7b6
Dec 28 18:40:24 turris updater[11669]: backend.lua:819 (pkg_merge_files): Config file /etc/config/simple-adblock modified by the user. Backing up the new one into /etc/config/simple-adblock-opkg
Dec 28 18:40:25 turris updater[11669]: src/lib/logging.c:162 (log_subproc_open): Running postinst of luci-i18n-simple-adblock-en
Dec 28 18:41:52 turris adblock-4.1.3[13259]: dns directory '/tmp' has been misconfigured, it must not point to the 'adb_tmpbase', 'adb_backupdir', 'adb_reportdir'
Dec 28 18:41:52 turris adblock-4.1.3[13259]: f_rmtemp ::: tmp_dir: -, src_file: /tmp/adb_sources.json, pid_file: /var/run/adblock.pid
Dec 28 18:41:52 turris adblock-4.1.3[13259]: f_rmdns  ::: dns: kresd, status: -, dns_dir: /tmp, dns_file: adb_list.overall, rt_file: /tmp/adb_runtime.json, backup_dir: /tmp/adblock-Backup
Dec 28 18:41:52 turris adblock-4.1.3[13259]: f_jsnup  ::: status: error, cnt: 0, mail: 0, mail_service: /etc/adblock/adblock.mail, mail_cnt: 0, mail_pid: -
Dec 28 18:42:50 turris updater[13954]: updater.lua:92 (Globals): Queue install of luci-i18n-adblock-en/luci/git-22.316.76471-782c7b6
Dec 28 18:42:52 turris updater[13954]: backend.lua:819 (pkg_merge_files): Config file /etc/config/adblock modified by the user. Backing up the new one into /etc/config/adblock-opkg
Dec 28 18:42:54 turris updater[13954]: src/lib/logging.c:162 (log_subproc_open): Running postinst of luci-i18n-adblock-en
Dec 28 18:44:04 turris adblock-4.1.3[15938]: f_report ::: action: json, count: 50, search: +, dump_util: /usr/sbin/tcpdump, rep_dir: /tmp/adblock-Report, rep_iface: -, rep_listen: 53, rep_chunksize: 1, rep_chunkcnt: 5, rep_resolve: 0

Can you login to the router using SSH and give the output from the file /etc/config/adblock?
Please paste the output in a preformatted text block
image

cat /etc/config/adblock

Edit:
Also, are you trying to use adblock or simple-adblock? Those are two different things, and in the logs I see some simple-adblock mentions.

Certainly, here's the output, and sorry for not doing that the first time

root@turris:~# cat /etc/config/adblock

config adblock 'global'
        option adb_safesearch '0'
        option adb_dnsfilereset '0'
        option adb_mail '0'
        option adb_backup '1'
        list adb_sources 'adaway'
        list adb_sources 'adguard'
        list adb_sources 'anti_ad'
        list adb_sources 'disconnect'
        list adb_sources 'notracking'
        list adb_sources 'yoyo'
        option adb_dnsflush '1'
        option adb_forcedns '1'
        option adb_report '1'
        list adb_zonelist 'lan'
        option adb_debug '1'
        option adb_lookupdomain 'google.ca'
        option adb_dnstimeout '20'
        option adb_dns 'kresd'
        option adb_tmpbase '/tmp'
        option adb_maxqueue '16'
        option adb_dnsdir '/tmp'
        option adb_enabled '1'
        option adb_fetchutil 'uclient-fetch'

I am definitely using adblock (not simple-adblock). I noticed that in the logs, but thought it might be an error/indicative of something wrong. Here's a screenshot to demonstrate:

Can you remove this option and restart the adblock service?

I am asking you because of this log entry:

DNS Directory should automatically point to the right directory for your DNS Backend.

Gladly, its been done. Still no information showing in Adblock :frowning:

root@turris:~# cat /etc/config/adblock

config adblock 'global'
        option adb_safesearch '0'
        option adb_dnsfilereset '0'
        option adb_mail '0'
        option adb_backup '1'
        list adb_sources 'adaway'
        list adb_sources 'adguard'
        list adb_sources 'anti_ad'
        list adb_sources 'disconnect'
        list adb_sources 'notracking'
        list adb_sources 'yoyo'
        option adb_dnsflush '1'
        option adb_forcedns '1'
        option adb_report '1'
        list adb_zonelist 'lan'
        option adb_debug '1'
        option adb_lookupdomain 'google.ca'
        option adb_dnstimeout '20'
        option adb_dns 'kresd'
        option adb_tmpbase '/tmp'
        option adb_maxqueue '16'
        option adb_enabled '1'
        option adb_fetchutil 'uclient-fetch'

Can you confirm there are no more errors showing up in the log?

Can you provide the contents of the /etc/config/dhcp and /etc/config/network file as well?

Gladly, there are no more errors in the log. Its empty:
No adblock related logs yet!

Sure here's the contents:

/etc/config/dhcp

root@turris:~# cat /etc/config/dhcp

config dnsmasq
        option domainneeded '1'
        option boguspriv '1'
        option filterwin2k '0'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option nonegcache '0'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
        option nonwildcard '1'
        option localservice '1'
        option ednspacket_max '1232'
        option port '0'

config dhcp 'lan'
        option interface 'lan'
        option dhcpv4 'server'
        option dhcpv6 'server'
        option ra 'server'
        option ra_slaac '1'
        list ra_flags 'managed-config'
        list ra_flags 'other-config'
        option ignore '0'
        option start '2'
        option limit '75'
        option leasetime '43200'
        list dhcp_option '6,10.50.255.1'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'
        list ra_flags 'none'

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

config dhcp 'guest_turris'
        option interface 'guest_turris'
        option ignore '0'
        option start '100'
        option limit '150'
        option leasetime '3600'
        option dhcpv6 'server'
        option ra 'server'
        list dhcp_option '6,10.111.222.1'

config host
        option mac '***************'
        option ip '***********'
        option name '**********'
        option leasetime 'infinite'
        option dns '1'
I *'d out the static IP i have configured because i'm paranoid :) 

And here's /etc/config/network

root@turris:~# cat /etc/config/network

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fdb0:c07b:88cc::/48'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ip6assign '60'
        option _turris_mode 'managed'
        list ipaddr '10.50.255.1/24'

config interface 'wan'
        option device 'eth2'
        option proto 'dhcp'
        option ipv6 '1'
        option delegate '0'

config interface 'guest_turris'
        option enabled '1'
        option proto 'static'
        option device 'br-guest-turris'
        option ipaddr '10.111.222.1'
        option netmask '255.255.255.0'
        option ip6assign '64'

config device 'br_guest_turris'
        option name 'br-guest-turris'
        option type 'bridge'
        option bridge_empty '1'

config device 'br_lan'
        option name 'br-lan'
        option type 'bridge'
        list ports 'lan0'
        list ports 'lan1'
        list ports 'lan2'
        list ports 'lan3'
        list ports 'lan4'

config interface 'wan6'
        option device '@wan'
        option proto 'dhcpv6'

config device 'dev_wan'
        option name 'eth2'

Can't really spot what is going wrong right now. Could you either disable the Force local DNS option or add the different forced ports to the list? Not sure if that is causing issues, the documentation is not clear on if that value is mandatory.

After the change save & apply and restart / reload adblock.

Edit:
I think the log view does not show messages about domains being blocked, it is just a log about the service as far as I know.
So if that looks like this it should be good:

Fri Dec 30 00:08:18 2022 user.info adblock-4.1.5[PID]: adblock instance started ::: action: reload, priority: 0, pid: PID
Fri Dec 30 00:08:38 2022 user.info adblock-4.1.5[PID]: blocklist with overall 51638 blocked domains loaded successfully

I noticed your reporting settings are not complete. Please add the interface you want to log (and the one you are actually using right now for internet access) in the Settings --> Advanced report settings tab.

Certainly. I've disabled 'force local DNS', but not added any different forced post to the list.

Did reload, then restart. No change. I will share that after sharing the last group of logs, one thing showed up in the adblock logs, but this was many many hours ago:

Dec 29 23:30:26 turris adblock-4.1.3[13250]: f_report ::: action: json, count: 50, search: +, dump_util: /usr/sbin/tcpdump, rep_dir: /tmp/adblock-Report, rep_iface: -, rep_listen: 53, rep_chunksize: 1, rep_chunkcnt: 5, rep_resolve: 0

I've also added 'br-lan' which i believe encompasses all LAN traffic, as the interface I want to log under settings --> advanced report settings.

I also changed the download utility from 'uclient-fetch' to curl, and then rebooted the router. No change :(, all adblock info is still blank

Check if the adblock service is enabled at all, e.g. post the output of ...

/etc/init.d/adblock enabled; echo $?

Confirmed its running:

root@turris:~# /etc/init.d/adblock enabled; echo $?
1
root@turris:~#

Nope, that means the service is disabled! Just enable the service ...

/etc/init.d/adblock enable

For whatever reason the turris guys still don't enable the services on installation ... :sleepy:

1 Like

Lol wow, what an epic fail on my part. What's funny is in Luci it shows as enabled. Sorry for the rookie mistake

Edit:
Ok its enabled now:

root@turris:~# /etc/init.d/adblock enable
root@turris:~# /etc/init.d/adblock enabled; echo $?
0

No change, still all blank in Luci :frowning:

Edit again:
Threw some more commands like enable, enabled, start in putty AND ITS RUNNING HOLY CRAP. THANK YOU

2 Likes

Even if adblock is enabled ... as long the service is disabled you'll never get a result ... :slight_smile:
The services can be checked in LuCI under System => Startup.

2 Likes

In Luci, Adblock, General Settings....try unchecking: "Force Local DNS"

And for "Startup Trigger Interface" select WAN.

See what that does. That's how mine is set up.

I am also on Turris OS. The service is enabled and works fine. It's just that when I reboot the device, the block lists are not loading, and I have to do it manually. On each reboot. How can this be solved?

EDIT: Now it works. I set the trigger to WAN. Before the trigger and undefined (so timed with 2s delay), the service was enabled, but it would not start. Why?

HI! Sorry for my long story, but it is not clear to me (im newbie here) what can cause this.
I do a search here, but I dont find anything to solve my case.

Im using RT-AC58U (v.1) with OpenWRT 21.02.03. r16554 with extroot and swap enabled.
Im also using role WIFI client (wlan1) as a WAN device for connecting to main router with DNS-o-TLS function enabled on it (on main router).
Im using Adblock (4.1.3) - status page showing enabled with 178.889 blocked domains.
On a Status page i can see a plenty of free RAM (luci/admin/status/overview - 29,76 MB RAM of 128) and from my point of view, Adblock is not working ...
I checked config and set a Trigger delay to 30 secs; Download queue to 4; verbose logging on;
startup trigger interface: unspecified / wwan (my "WAN port" via wifi) report interface to: wlan1 (my "WAN" port).
Check with DNS report - shows 1,63% hit ratio (34 of 2091)

Actually I dont have have any idea even where to find other things to try out.
Sorry for my english, is not my native language. Any help will be more than welcome. Thank you.

Why do you say Adblock is not working? How did you actually test it?

Correct me if I'm mistaken, but you mentioned at least two routers the OpenWRT router and the main router. Is the main router also using OpenWRT? Which router is serving DNS for your network? On which router is Adblock installed?