OpenWrt Forum Archive

Topic: adblock package, release 2.x

The content of this topic has been archived between 22 Mar 2018 and 4 May 2018. Unfortunately there are posts – most likely complete pages – missing.

dape wrote:

Hi, is it possible to integrate this list too?

https://easylist-downloads.adblockplus. … sylist.txt

Thanks!

Even better, with the next release cycle (adblock 1.1.x) you can add new sources yourself via uci interface. I'll take your list proposal as an example in the adblock documentation.

dibdot wrote:

Even better, with the next release cycle (adblock 1.1.x) you can add new sources yourself via uci interface. I'll take your list proposal as an example in the adblock documentation.

Thanks so much for your awesome work - i integrated adblock for people that use RCS&RDS provider in my country at https://swrt.ro and so far your package seems to be working absolutely smooth.

@dibdot,  You are doing a phenomenal job.  I am especially excited to see that in the next stage of development that you are adding the ability for the user to add their own sources through the UI.

Anyway, I have a question with regards to the whitelist feature.  I have specifically been having issues with YouTube videos taking an extra 40-60 seconds before they will initialize and start playing.  Using the Developer Tools within Chromium and looking in the Network section, I can see which domains are failing (getting blocked) and causing the delay in loading time.

Here is the contents of my adblock.whitelist file exactly as I have it:

googlesyndication.com
googleadservices.com
google-analytics.com
doubleclick.net

However, after rebooting the router and also the devices on the network a few times, I still have the initial slow loading of YouTube videos and the Developer Tools - Network section of Chromium still shows the same domains failing, causing long time out during the blockage.

So what I am wondering is, do I need to be more specific with sub-domains, etc.?

Hypothetical example:

ads2.googlesyndication.com
page2.googleadservices.com
adserver.google-analytics.com
ads2.doubleclick.net

Thank you for your time.

WildByDesign wrote:

So what I am wondering is, do I need to be more specific with sub-domains, etc.?

Short answer: Yes! wink
The whitelist implementation is currently very simple and don't support wildcards, it's basically a 1:1 text compare - each exact match will be removed, but no substring removal.

Example:
Search for "google-analytics.com" in all blocklists:

root@OpenWrt:/var/dnsmasq.d$ cat adb_list.* | grep "google-analytics.com"
address=/google-analytics.com/192.0.2.1
address=/ssl.google-analytics.com/192.0.2.1
address=/www.google-analytics.com/192.0.2.1

Now I put "google-analytics.com" in the whitelist, restart adblock and repeat the search:

root@OpenWrt:/var/dnsmasq.d$ cat adb_list.* | grep "google-analytics.com"
address=/ssl.google-analytics.com/192.0.2.1
address=/www.google-analytics.com/192.0.2.1

As you can see, both "sub-domains" will remain active. I put it on my todo list to make this more powerful, but no promises ...

Anyway, could you please send me some example youtube links with the timeout issue (to my maintainer email, please). At this stage I can't reproduce those timeouts.

Thanks!

(Last edited by dibdot on 7 Apr 2016, 20:25)

You need to check what gets reported by your filter sources (exact match), e.g. "grep googlesyndication /tmp/dnsmasq.d/*".

@dibdot and @slh,  Thank you both for your responses.

Dirk, especially thank you for explaining how the whitelists/blacklists are being processed in a way that was easy for me to understand.  Your suggestion of being more specific with the subdomains as well has fixed my slow downs and YouTube videos are loading immediately now which is fantastic.  I appreciate your time and your hard work.  And I will definitely keep my fingers crossed for the future possibility of having more power with the whitelists/blacklists.

I will send a quick email shortly as well with a copy of the network traffic details from Chromium's developer tools. Essentially though, this was affecting any and all YouTube videos for me and all of the advertisement/tracker servers were being delayed and giving a "failed" response (each with a delay of approx. 4 seconds), I assume to be a time out of some sort.  After following your suggestion to be specific with subdomains, all videos are loading immediately and instead of failed responses, the advertisement/tracker servers are providing error "500" status and only a typical delay of approx. 1-2ms.  So all is well now.  But I will send the network capture screenshot to your email shortly anyway for curiosity sake.  Thank you again for your help.

Hi,

I saw that this project is based on DNS requests. But is there any progress to use IP based lists with ipset? For example lists from https://iblocklists.com

Timeless wrote:

Hi,

I saw that this project is based on DNS requests. But is there any progress to use IP based lists with ipset? For example lists from https://iblocklists.com

IP based blocking will not work with certain content providers ... for a well known example see here

Hello. I am trying to install adblock package on my Raspberry Pi 2. I have Chaos Calmer 15.05.1 installed (with several packages from 15.05 version). However I don't see brcm2709 subbranch here downloads.openwrt.org/snapshots/trunk/brcm2708/. Is there any other place I should look for the adblock package? Or should I start learning the process of building packages for custom targets? Thanks a lot!

avs.andrew wrote:

Hello. I am trying to install adblock package on my Raspberry Pi 2. I have Chaos Calmer 15.05.1 installed (with several packages from 15.05 version). However I don't see brcm2709 subbranch here downloads.openwrt.org/snapshots/trunk/brcm2708/. Is there any other place I should look for the adblock package?

The package is just scripts, so an *.ipk package from any platform should be fine.

You could try using https://downloads.openwrt.org/snapshots … -1_all.ipk

First, many thanks for your efforts and any help

Is there a way to debug/troubleshoot? My installation is not working and here is the output

adblock[1790] info : domain adblock processing started (1.0.3, 15.05, 21.04.2016 22:12:09)
adblock[1790] info : backup/restore will be disabled
adblock[1790] error: failed to initialize volatile IPv4 firewall rule 'adb-prerouting', rc: 1
adblock[1790] info : no backups found, nothing to restore
adblock[1790] info : domain adblock processing failed (1.0.3, 15.05, 21.04.2016 22:12:10)

faser wrote:

First, many thanks for your efforts and any help

Is there a way to debug/troubleshoot? My installation is not working and here is the output

adblock[1790] info : domain adblock processing started (1.0.3, 15.05, 21.04.2016 22:12:09)
adblock[1790] info : backup/restore will be disabled
adblock[1790] error: failed to initialize volatile IPv4 firewall rule 'adb-prerouting', rc: 1
adblock[1790] info : no backups found, nothing to restore
adblock[1790] info : domain adblock processing failed (1.0.3, 15.05, 21.04.2016 22:12:10)

Please change the "DEBUG" parm in the header of /usr/bin/adblock-update.sh to "DEBUG=1" and restart /usr/bin/adblock-update.sh directly, without any parameters.

dibdot wrote:

Please change the "DEBUG" parm in the header of /usr/bin/adblock-update.sh to "DEBUG=1" and restart /usr/bin/adblock-update.sh directly, without any parameters.

Thanks for the info, actually after a router reboot the script executed correctly. Maybe I had been running out of memory.

My skill level is only up to entering the name of the package files with opkg install xxxxx, so bear with me.  I did find the adblock ipk file but that's as far as I got ....

-----------------------------------------------------
CHAOS CALMER (15.05.1, r48532)
-----------------------------------------------------

root@OpenWrt:~# opkg install /tmp/adblock_1.0.3-1_all.ipk
Installing adblock (1.0.3-1) to root...
Installing wget (1.17.1-1) to root...
Downloading [url]http://downloads.openwrt.org/chaos_calmer/15.05.1/ar71xx/nand/packages/packages/wget_1.17.1-1_ar71xx.ipk.[/url]
Installing libpcre (8.38-1) to root...
Downloading [url]http://downloads.openwrt.org/chaos_calmer/15.05.1/ar71xx/nand/packages/packages/libpcre_8.38-1_ar71xx.ipk.[/url]
Installing librt (0.9.33.2-1) to root...
Downloading [url]http://downloads.openwrt.org/chaos_calmer/15.05.1/ar71xx/nand/packages/base/librt_0.9.33.2-1_ar71xx.ipk.[/url]
Installing libpthread (0.9.33.2-1) to root...
Downloading [url]http://downloads.openwrt.org/chaos_calmer/15.05.1/ar71xx/nand/packages/base/libpthread_0.9.33.2-1_ar71xx.ipk.[/url]
Configuring libpcre.
Configuring libpthread.
Configuring librt.
Configuring wget.
Configuring adblock.
adblock[10698] info : adblock installation finished, 'opkg' currently locked by package installer
root@OpenWrt:~# cd /tmp
root@OpenWrt:/tmp# wget [url]http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/luci/luci-app-adblock_git-1[/url]
6.092.45070-c5c199b-1_all.ipk
--2016-04-24 23:48:03--  [url]http://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/packages/luci/luci-app-adblock_git-16.092.45070-c5c199b-1_all.ipk[/url]
Resolving downloads.openwrt.org... 78.24.191.177
Connecting to downloads.openwrt.org|78.24.191.177|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2016-04-24 23:48:03 ERROR 404: Not Found.

root@OpenWrt:/tmp#
DonJuane wrote:

My skill level is only up to entering the name of the package files with opkg install xxxxx, so bear with me.  I did find the adblock ipk file but that's as far as I got ....

[...]

The luci package fingerprint change quite frequently, please look at  https://downloads.openwrt.org/snapshots … ages/luci/ and take the latest luci-app-adblock package from there.

That worked.   Thanks!   Now is there anything I have to do to make the package start when the unit is booted?   How about to update the adblock lists.   Is this automatic?

Ref: https://github.com/openwrt/packages/blo … /README.md

"for a scheduled call of the adblock service via /etc/init.d/adblock start add an appropriate crontab entry"

Not clear if this is necessary?  e.g. Does it start with the boot of the router?

Also is the downloading of block lists automatic or should some cron entry be made and if so, what?   Thanks!

(Last edited by DonJuane on 25 Apr 2016, 16:14)

DonJuane wrote:

That worked.   Thanks!   Now is there anything I have to do to make the package start when the unit is booted?   How about to update the adblock lists.   Is this automatic?
[...]

adblock starts automatically during boot/wan-ifup event, so nothing to do for you. You can check adblock boot messages with

logread -e "adblock"


For a regular block list update, please add an adblock crontab entry, described here.

Are distinct IP addresses OK to use in the adblock.blacklist or should only domain names be used?    How about subdomains such as telemetry.microsoft.com?   Thank you!

DonJuane wrote:

Are distinct IP addresses OK to use in the adblock.blacklist or should only domain names be used?    How about subdomains such as telemetry.microsoft.com?   Thank you!

It's all about dns resolution, so please use (sub) domain names only.

(Last edited by dibdot on 27 Apr 2016, 09:04)

I'm trying to install the luci app, but it's not working:

root@OpenWrt:/tmp# opkg install luci-app-adblock
Unknown package 'luci-app-adblock'.
Collected errors:
 * opkg_install_cmd: Cannot install package luci-app-adblock.

my repo settings should be fine, I can install other luci packages without problems (like luci-app-openvpn)

I'm running CHAOS CALMER (15.05, r46767) and installed the adblock ipk manually.

hscho wrote:

I'm trying to install the luci app, but it's not working:

root@OpenWrt:/tmp# opkg install luci-app-adblock
Unknown package 'luci-app-adblock'.
Collected errors:
 * opkg_install_cmd: Cannot install package luci-app-adblock.

my repo settings should be fine, I can install other luci packages without problems (like luci-app-openvpn)

I'm running CHAOS CALMER (15.05, r46767) and installed the adblock ipk manually.

luci-app-adblock is not included in the 15.05.1 release, as it has been added later to the source repo. You need to install it manually, too.

(Last edited by hnyman on 27 Apr 2016, 20:29)

how do I do that? the to install the ipk file was easy but I don't know how to install a luci addon manually...

hscho wrote:

how do I do that? the to install the ipk file was easy but I don't know how to install a luci addon manually...

There is quite similar .ipk file for the luci app, too.
currently luci-app-adblock_git-16.116.50770-9151103-1_all.ipk
E.g. https://downloads.openwrt.org/snapshots … -1_all.ipk

(Last edited by hnyman on 27 Apr 2016, 22:00)

Sorry, posts 151 to 150 are missing from our archive.