Yeah, no more logs after this and I'm ready to test any config edits
If you could try changing two lines in the /etc/init.d/simple-adblock
from:
param=dnsmasq_hup
to
param=dnsmasq_restart
I believe it would solve the issue.
In the latest code of simple-adblock, that's lines 411 and 452. There are only two entries like that in the whole file anyways.
Hello,
Can you please answer this question posted in another thread for simple adblock?
For https://d3ward.github.io/toolz/adblock.html I get 10%
and for https://adblock-tester.com/ I get 28 points out of 100
Thank you,
I'm not sure what the second link is testing, there are certainly add-ons for browsers which can parse the whole page being loaded and block specific elements of that page, that's not how router-based ad-blocking works. Either adblock or simple-adblock block the domains, they have no access to the actual web pages you load..
So the first link in that post (https://d3ward.github.io/toolz/adblock.html, which tests which domains are blocked) -- you can have as little as 0% or as much as 100%, depending on what you need/want. Whatever domains from that list which are not blocked thru the downloadable sources you can block in the simple-adblock
settings yourself (and achieve 100% on that site if that's so important to you).
It worked for me, after boot delay I can see the log daemon.info dnsmasq[1]: using 19111 more local addresses
and ad is blocked
Thanks for testing, I'll fix it in the source and send PR.
If you could test 1.9.1-1 from my repo before I send the PR, I'd appreciate it.
I've followed the instruction, after that I've upgraded simple-adblock packages to 1.9.1-1
And it doesn't work for me and shows a lot of errors like this:
Sun Sep 18 08:13:09 2022 user.notice simple-adblock [4104]: ERROR: failed to create /var/run/simple-adblock/dnsmasq.servers file!
Sun Sep 18 08:13:09 2022 daemon.notice procd: /etc/rc.d/S94simple-adblock: /etc/rc.common: eval: line 555: can't create /var/run/simple-adblock/simple-adblock.json: nonexistent directory
Sun Sep 18 08:13:09 2022 daemon.notice procd: /etc/rc.d/S94simple-adblock: /etc/rc.common: eval: line 555: can't create /var/run/simple-adblock/simple-adblock.json: nonexistent directory
Oh, thanks for catching this, if you redownload/reinstall the package, it's been fixed.
It's working now without problems
Thanks for your feedback and a lot of testing, I'll try to send PR for an updated version to master branch some time this week and I'll probably cherry-pick it for 22.03, but not older releases.
Howdy! Absolutely adore the simple-adblock package. One note and maybe I'm not seeing a setting. Rebooting causes the force_dns firewall rules to disappear. If I reapply the config they reappear but do they have any persistence? I'm still new to the openwrt platform but I am trying to learn the location of configs and settings.
How do you check if the rules are still there?
They should be reapplied on each service start (and boot as well).
I am going to status > firewall and I usually see the rules in Rule container chain "dstnat_lan"
and Rule container chain "forward_lan"
. Is there a .nft file that contains the rules that are applied on boot?
Let me conduct some tests.
No, it's the PROCD firewall object which is added on start. Can you test something please. If you don't see the firewall redirects in the list next time, instead of restarting simple-adblock
, could you please do fw4 reload
?
I suspect that the issue might be that simple-adblock does create the PROCD object with firewall redirects, but fails to reload firewall with the new setting.
Rebooted, waited a few minutes for the blocked host list to download and checked the status > firewall section and nothing.
fw4 -v reload
also didn't load your rules.
Heres my config as it stands:
option config_update_url 'https://cdn.jsdelivr.net/gh/openwrt/packages/net/simple-adblock/files/simple-adblock.conf.update'
option dns_instance '0'
option verbosity '2'
option force_dns '1'
list force_dns_port '53'
list force_dns_port '853'
option led 'none'
option boot_delay '120'
option download_timeout '10'
option curl_retry '3'
option parallel_downloads '1'
option debug '0'
option compressed_cache '0'
option enabled '1'
list blocked_hosts_url 'https://cdn.jsdelivr.net/gh/StevenBlack/hosts@master/alternates/fakenews/hosts'
option dns 'dnsmasq.addnhosts'
option ipv6_enabled '1'
option config_update_enabled '1'
simply saving and applying without making any changes adds the rules.
I appreciate you trying to investigate this. Have you tried to play with boot_delay
option? Does that help if you set it to 15/30/60 seconds? I may reach out directly if I have any other ideas why procd firewall object is not being created.
Hi all, I noticed that simple adblock stopped working, I think after a package update, from sortware section on router.
My router is one Netgear R7800 with OpenWrt 21.02.3 r16554-1d4dea6d4f
/etc/init.d/simple-adblock reload
Starting simple-adblock 1.8.8-1...
Downloading lists ✗✗✗✗✗✗
ERROR: failed to create /var/run/simple-adblock.servers file!
simple-adblock 1.8.8-1 Fail: Downloading...
ERROR: failed to download Config Update file!
ERROR: failed to download https://pgl.yoyo.org/as/serverlist.php?hostformat=hosts&showintro=1&mimetype=plaintext!
ERROR: failed to download https://someonewhocares.org/hosts/hosts!
ERROR: failed to download https://winhelp2002.mvps.org/hosts.txt!
ERROR: failed to download https://cdn.jsdelivr.net/gh/hoshsadiq/adblock-nocoin-list/hosts.txt!
ERROR: failed to download https://adaway.org/hosts.txt!
ERROR: failed to create /var/run/simple-adblock.servers file!
ERROR: failed to create block-list or restart DNS resolver!
What kind of logs can I provide to better understand where the problem is?
curl
was recently broken in 21.02 for https after the WolfSSL update. It has been fixed since, but you may need to redownload/reinstall curl/libwolfssl.
Ok, so I only have to wait the update?
I tried with:
opkg --force-overwrite --force-reinstall install curl libwolfssl
Removing package curl from root...
Installing curl (7.83.1-2.1) to root...
Downloading https://downloads.openwrt.org/releases/21.02.3/packages/arm_cortex-a15_neon-vfpv4/packages/curl_7.83.1-2.1_arm_cortex-a15_neon-vfpv4.ipk
Package libwolfssl5.5.1.99a5b54a (5.5.1-stable-2) installed in root is up to date.
Configuring curl
but without luck