Adblock support thread

Hi @dibdot and @RuralRoots .. Stephen of OISD just replied to me that he reverted the configuration in CloudFlare "enforced transfer encoding" and after testing curl, uclient-fetch now works again hahahaha

But I think the github mirror is better for now.

4 Likes

It should work again now even if you haven't updated or gotten the latest adblock version. The maintainer of OISD adjusted his firewall settings.

Hi,

installed

AdBlock Package adblock (4.1.5-3)

on

OpenWrt 22.03.1 r19777-2853b6d652 / LuCI openwrt-22.03 branch git-22.288.45147-96ec0cd .

give a Error . In system log i see:

Sun Oct 23 21:24:10 2022 user.err adblock-4.1.5[29786]: coreutils sort not found or not executable
Sun Oct 23 21:24:13 2022 user.err adblock-4.1.5[29917]: coreutils sort not found or not executable
Sun Oct 23 21:24:29 2022 user.err adblock-4.1.5[30236]: coreutils sort not found or not executable
Sun Oct 23 21:24:38 2022 user.err adblock-4.1.5[30534]: coreutils sort not found or not executable
Sun Oct 23 21:24:47 2022 user.err adblock-4.1.5[30668]: coreutils sort not found or not executable

This pacjkage is already installed.

So where's the problem? Thank you!

I'm having similar issues (ads still showing) when using OISD, even after updating adblock.sources.
When I look at /tmp/adblock-Backup/adb_list.oisd_full I can see it's populated and adblock status reports "464,868 blocked domains", however DNS queries for blocked domains are still successful.

If I switch to another list such as CPBL (126,878 blocked domains) DNS queries return NXDOMAIN as expected.

I notice there's a difference in the backed up lists. OISD includes .*, CPBL doesn't.

Eg:

/tmp/adblock-Backup/adb_list.cpbl
au.com.realestate.analytics <-- this will return an NXDOMAIN

/tmp/adblock-Backup/adb_list.oisd_full
au.com.realestate.analytics.* <-- this won't return an NXDOMAIN

Shouldn't the .* be stripped by the adblock.sources rule? I didn't think dnsmasq supported wildcards.

Sorry for the mess, the regex for the oisd variants has been fixed in 4.1.5-4, see https://github.com/openwrt/packages/commit/e90b4c01e1619ce4adf16abb9f63c772b44fefe9 for reference.

2 Likes

Thanks, just tested and that worked a treat.

1 Like

Your sort package installation is borked (most probably due to a busybox update via opkg), just reinstall the coreutils-sort package with the force option.

1 Like

Yes @dibdot in fact previusly i run command opkg list-upgradable | cut -f 1 -d ' ' | xargs -r opkg upgrade . Removed and reinstalled seem to be ok! Thanks.

I got a question regarding Adblock in combination with unbound.

As I understand Adblock has a script that saves and injects the unbound-cache on reload. I enabled agressive recursion strength in the unbound settings to enable prefetching of expired domains. Does anyone know if the prefetching still works when Adblock ist set to reload daily and therefore unbound gets restarted daily (with injected cache)?

...as long as you've installed unbound-control too, the cache will be restored.

What is the reason that Adblocker is unable to stop the ads coming from "beap.gemini.yahoo.com" although this address has already in the filter lists?

Have you tried opening the URL "beap.gemini.yahoo.com" from the browser? If it loads/opens then somehow your browser is bypassing your OpenWRT's DNS resolver. Now if it doesn't, it means that yahoo is loading the ads from a different domain somehow.

I've tried your yahoo.com site based from your screenshot and i'm not sure if we are loading the same page but on mine, it uses a different ad server (see screenshot).

It blocks sub domain sg3.beap.gemini.yahoo.com but not beap.gemini.yahoo.com, I just wonder anything that I can fine-tune with it, it is supposed to block all, my guest.

Additionally the top banner ads (googleads.g.doubleclick.net), my AdBlock almost hides out everything including the "unable to display error".

But is the popularity of domains stored in this cache? In the unbound docs it is stated, that prefetching ist done for "popular items". If this information (about how often domains are served) is not stored in the cache and not restored after restart, prefetching maybe will not work as intended. If this is the case, it could be better to reload adblock less frequent than once a day.

As @dibdot mentioned, you gotta add startup trigger interface like 'wan'. For me disconnection of wan was messing with adblock download list every day. So I tried a different workaround. I set it as default 'unspecified'. Then in root create a script

#!/bin/bash
while ! ping -c 1 -W 1 8.8.8.8 > /dev/null 2>&1; do
    # echo "Waiting for 8.8.8.8 - network interface might be down..."
    sleep 10
done
service adblock reload
echo "Adblock Service Manually Reloaded"

Save as ReloadAdblock with 0755 permission. Code simply waits for internet connection to establish period of 10 seconds. Once WAN is connected it reloads the adblock list.
Now you gotta put this script in rc.local file to work on every reboot. So add,

/root/ReloadAdblock
exit 0

This is my AdBlock configuration, it works well for me.

Please note: On a reload trigger action adblock runs with the "start" action, that means it uses backups if available and re-uses them - no new downloads.

When I reboot my router, adblock shows error with 0 domain blocked. Error occurs due to time it takes to connect to PPPoE WAN. Since there's no backup after the reboot, after WAN connects when I enter "adblock reload" in shell it download all the list. It means reload command does download the updates? Right?

Just raise the "Trigger Delay" on the Additional Options tab in LuCI, default are 5 seconds ... e.g. start with 30 seconds and see if it fits for you.

1 Like