# Adblock support thread

**URL:** <https://forum.openwrt.org/t/adblock-support-thread/507>\
**Category:** Community Builds, Projects & Packages\
**Created:** [December 11, 2016, 6:16pm UTC](https://forum.openwrt.org/t/adblock-support-thread/507 "2016-12-11T18:16:55Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![dibdot](https://forum.openwrt.org/user_avatar/forum.openwrt.org/dibdot/32/3100_2.png) [@dibdot](https://forum.openwrt.org/u/dibdot)\
**Post date:** [December 11, 2016, 6:16pm UTC](https://forum.openwrt.org/t/adblock-support-thread/507/1 "2016-12-11T18:16:55Z")

</div>

Hi,

in OpenWrt stable & snapshot package repo you'll find the adblock package (plus LuCI companion/configuration package):

> latest snapshot version: [adblock 4.5.9-4](https://downloads.openwrt.org/snapshots/packages/x86_64/packages/) plus [luci companion package 4.5.9-2](https://downloads.openwrt.org/snapshots/packages/x86_64/luci/)

> stable OpenWrt version 25.12.x.: [adblock 4.5.9-4](https://downloads.openwrt.org/releases/packages-25.12/x86_64/packages/) plus [luci companion package 4.5.9-2](https://downloads.openwrt.org/releases/packages-25.12/x86_64/luci/)

> Link to the latest [adblock documentation](https://github.com/openwrt/packages/blob/master/net/adblock/README.md)

> Link to the latest [adblock changelog](https://github.com/openwrt/packages/commits/master/net/adblock)

Feel free to test, ask questions or make suggestions.

Have fun!  
Dirk

---

<div class="post-metadata">

**Author:** ![hnyman](https://forum.openwrt.org/user_avatar/forum.openwrt.org/hnyman/32/19_2.png) [@hnyman](https://forum.openwrt.org/u/hnyman)\
**Post date:** [December 11, 2016, 8:40pm UTC](https://forum.openwrt.org/t/adblock-support-thread/507/2 "2016-12-11T20:40:30Z")

</div>

At the first glance, it seems to work nicely.

---

<div class="post-metadata">

**Author:** ![htmt](https://forum.openwrt.org/user_avatar/forum.openwrt.org/htmt/32/147_2.png) [@htmt](https://forum.openwrt.org/u/htmt)\
**Post date:** [December 12, 2016, 9:00am UTC](https://forum.openwrt.org/t/adblock-support-thread/507/3 "2016-12-12T09:00:58Z")

</div>

logread -e "adblock" gives the following output:

Mon Dec 12 09:53:36 2016 daemon.err adblock.sh[944]: udhcpc: started, v1.25.1  
Mon Dec 12 09:53:36 2016 daemon.err adblock.sh[944]: udhcpc: sending discover  
Mon Dec 12 09:53:39 2016 daemon.err adblock.sh[944]: udhcpc: no lease, failing  
Mon Dec 12 09:53:39 2016 daemon.err adblock.sh[944]: udhcpc: started, v1.25.1  
Mon Dec 12 09:53:39 2016 daemon.err adblock.sh[944]: udhcpc: sending discover  
Mon Dec 12 09:53:42 2016 daemon.err adblock.sh[944]: udhcpc: no lease, failing  
Mon Dec 12 09:53:42 2016 user.notice adblock-[1.9.99-pre0] info: block lists with overall 132369 domains loaded (1.9.99-pre0, LEDE Reboot CURRENT r2437-854459a)

I removed the previous package and luci addon with luci.

---

<div class="post-metadata">

**Author:** ![hnyman](https://forum.openwrt.org/user_avatar/forum.openwrt.org/hnyman/32/19_2.png) [@hnyman](https://forum.openwrt.org/u/hnyman)\
**Post date:** [December 12, 2016, 9:19am UTC](https://forum.openwrt.org/t/adblock-support-thread/507/4 "2016-12-12T09:19:37Z")

</div>

> [@htmt](#):
>
> daemon.err adblock.sh[944]: udhcpc: sending discover

udhcpc is the DHCP client fetching a WAN address from your ISP for your WAN interface. Nothing to do with adblock (or DNS) by itself.

Does your router get WAN address when adblock is disabled?

But you seem to have a lot of blocklists loaded. You might test first with only a few lists. And you might reboot the router one more time so that there are surely no leftovers in dnsmasq tmp from the previous ablock version.

---

<div class="post-metadata">

**Author:** ![htmt](https://forum.openwrt.org/user_avatar/forum.openwrt.org/htmt/32/147_2.png) [@htmt](https://forum.openwrt.org/u/htmt)\
**Post date:** [December 12, 2016, 9:40am UTC](https://forum.openwrt.org/t/adblock-support-thread/507/5 "2016-12-12T09:40:32Z")

</div>

My router gets a WAN address also when adblock is enabled.  
As far as I can see adblock2 is working without a problem. I just don't understand the errormessages in the log.  
My router has plenty of ram (512 MB), so I thought is is not a problem to enable almost every list.

---

<div class="post-metadata">

**Author:** ![dibdot](https://forum.openwrt.org/user_avatar/forum.openwrt.org/dibdot/32/3100_2.png) [@dibdot](https://forum.openwrt.org/u/dibdot)\
**Post date:** [December 12, 2016, 10:04am UTC](https://forum.openwrt.org/t/adblock-support-thread/507/6 "2016-12-12T10:04:32Z")

</div>

@htmt  
Does this dhcp "error" always appear (i.e. during a normal /etc/init.d/adblock restart) or only during boot?  
What happen if you change ...

`procd_set_param stderr 1` to `procd_set_param stderr 0`

in /etc/init.d/adblock?

Thanks for testing!

---

<div class="post-metadata">

**Author:** ![htmt](https://forum.openwrt.org/user_avatar/forum.openwrt.org/htmt/32/147_2.png) [@htmt](https://forum.openwrt.org/u/htmt)\
**Post date:** [December 12, 2016, 10:39am UTC](https://forum.openwrt.org/t/adblock-support-thread/507/7 "2016-12-12T10:39:17Z")

</div>

> [@dibdot](#):
>
> Does this dhcp "error" always appear (i.e. during a normal /etc/init.d/adblock restart) or only during boot?

Yes the error appears always (reboot and restart).

> [@dibdot](#):
>
> What happen if you change ...
> 
> procd\_set\_param stderr 1 to procd\_set\_param stderr 0
> 
> in /etc/init.d/adblock?

Still the same errormessage.

> [@dibdot](#):
>
> Thanks for testing!

I feel myself obliged to do so because adblock is why I bought this new router in the first place.  
Thanks for making this great tool!

---

<div class="post-metadata">

**Author:** ![dibdot](https://forum.openwrt.org/user_avatar/forum.openwrt.org/dibdot/32/3100_2.png) [@dibdot](https://forum.openwrt.org/u/dibdot)\
**Post date:** [December 12, 2016, 2:53pm UTC](https://forum.openwrt.org/t/adblock-support-thread/507/8 "2016-12-12T14:53:26Z")

</div>

> [@htmt](#):
>
> Yes the error appears always (reboot and restart).

OK, please make a "/etc/init.d/dnsmasq restart" for two times. First with enabled block lists and second time without adblock (after /etc/init.d/adblock stop). In both cases please check the log for dnsmasq/dhcpc errors like you've posted above.

Thanks again!

---

<div class="post-metadata">

**Author:** ![htmt](https://forum.openwrt.org/user_avatar/forum.openwrt.org/htmt/32/147_2.png) [@htmt](https://forum.openwrt.org/u/htmt)\
**Post date:** [December 12, 2016, 4:13pm UTC](https://forum.openwrt.org/t/adblock-support-thread/507/9 "2016-12-12T16:13:33Z")

</div>

Mon Dec 12 16:53:58 2016 daemon.err adblock.sh[1843]: udhcpc: started, v1.25.1  
Mon Dec 12 16:53:58 2016 daemon.err adblock.sh[1843]: udhcpc: sending discover  
Mon Dec 12 16:54:01 2016 daemon.err adblock.sh[1843]: udhcpc: no lease, failing  
Mon Dec 12 16:54:01 2016 daemon.err adblock.sh[1843]: udhcpc: started, v1.25.1  
Mon Dec 12 16:54:01 2016 daemon.err adblock.sh[1843]: udhcpc: sending discover  
Mon Dec 12 16:54:04 2016 daemon.err adblock.sh[1843]: udhcpc: no lease, failing  
Mon Dec 12 16:54:05 2016 user.notice adblock-[1.9.99-pre0] info: block lists with overall 132369 domains loaded (1.9.99-pre0, LEDE Reboot CURRENT r2437-854459a)  
Mon Dec 12 17:05:48 2016 daemon.err adblock.sh[2657]: udhcpc: started, v1.25.1  
Mon Dec 12 17:05:48 2016 daemon.err adblock.sh[2657]: udhcpc: sending discover  
Mon Dec 12 17:05:51 2016 daemon.err adblock.sh[2657]: udhcpc: no lease, failing  
Mon Dec 12 17:05:51 2016 daemon.err adblock.sh[2657]: udhcpc: started, v1.25.1  
Mon Dec 12 17:05:51 2016 daemon.err adblock.sh[2657]: udhcpc: sending discover  
Mon Dec 12 17:05:54 2016 daemon.err adblock.sh[2657]: udhcpc: no lease, failing  
Mon Dec 12 17:05:54 2016 user.notice adblock-[1.9.99-pre0] info: block lists with overall 132369 domains loaded (1.9.99-pre0, LEDE Reboot CURRENT r2437-854459a)

I wouldn't be surprised when the problem is outside of Adblock.  
My router is, as of now, not fully supported by LEDE (TP-Link Archer C2600).

Adblocking is functional with this release.

If a full log is usefull, let me know.

---

<div class="post-metadata">

**Author:** ![stangri](https://forum.openwrt.org/user_avatar/forum.openwrt.org/stangri/32/58_2.png) [@stangri](https://forum.openwrt.org/u/stangri)\
**Post date:** [December 12, 2016, 11:18pm UTC](https://forum.openwrt.org/t/adblock-support-thread/507/10 "2016-12-12T23:18:50Z")

</div>

> [@dibdot](#):
>
> removed complete firewall handling (no longer required)

So dns hijacking is no longer an option with adblock2?

I haven't mastered wrapping firewall rules in procd instance, but if you'd want to bring back the pixelserv, I found out uhttpd is really easy to include in PROCD instance.

On ipq806x LEDE Reboot CURRENT r2437+12 with uclient-fetch and ustream-mbedtls installed, adblock2 fails with `error: fetch utility 'uclient-fetch' or 'wget' not found`. Maybe the below will help:

`root@EA8500:~# which /usr/bin/wget* root@EA8500:~# which uclient-fetch /bin/uclient-fetch root@EA8500:~# which /bin/wget* /bin/wget root@EA8500:~# ls -la $_ lrwxrwxrwx 1 root root 13 Dec 10 16:24 /bin/wget -> uclient-fetch`

---

<div class="post-metadata">

**Author:** ![dibdot](https://forum.openwrt.org/user_avatar/forum.openwrt.org/dibdot/32/3100_2.png) [@dibdot](https://forum.openwrt.org/u/dibdot)\
**Post date:** [December 13, 2016, 4:56am UTC](https://forum.openwrt.org/t/adblock-support-thread/507/11 "2016-12-13T04:56:49Z")

</div>

> [@stangri](#):
>
> So dns hijacking is no longer an option with adblock2?

🙂  
Still it's all about dns spoofing/hijacking but we do not longer need all the firewall/pixel server stuff for that. The dns server itself returns a simple 'NXDOMAIN'. This is nothing but Non-eXistent Internet or Intranet domain name, if domain name is unable to resolve using the dns server, a condition called the 'NXDOMAIN' occurred.

On client side you'll see things like that:

> root@x250:/home/dirk# nslookup [doubleclick.net](http://doubleclick.net)  
> Server: 192.168.1.1  
> Address: 192.168.1.1#53  
> \*\* server can't find [doubleclick.net](http://doubleclick.net): NXDOMAIN

or that (captured during a youtube session):

> root@x250:/home/dirk# tcpdump -nt -i wlan0 udp port 53  
> tcpdump: verbose output suppressed, use -v or -vv for full protocol decode  
> listening on wlan0, link-type EN10MB (Ethernet), capture size 262144 bytes  
> IP 192.168.1.103.40371 \> 192.168.1.1.53: 44883+ A? [www.google-analytics.com](http://www.google-analytics.com). (42)  
> IP 192.168.1.103.40371 \> 192.168.1.1.53: 20204+ AAAA? [www.google-analytics.com](http://www.google-analytics.com). (42)  
> IP 192.168.1.1.53 \> 192.168.1.103.40371: 44883 NXDomain 0/0/0 (42)  
> IP 192.168.1.1.53 \> 192.168.1.103.40371: 20204 NXDomain 0/0/0 (42)  
> [...]

simple & quite effective! 😌

> [@stangri](#):
>
> On ipq806x LEDE Reboot CURRENT r2437+12 with uclient-fetch and ustream-mbedtls installed, adblock2 fails with error: fetch utility 'uclient-fetch' or 'wget' not found. Maybe the below will help:

As I wrote in my initial post you have to set two options in adblock config, for uclient-fetch use the following:

> option adb\_fetch '/bin/uclient-fetch'  
> option adb\_fetchparm '-q'

---

<div class="post-metadata">

**Author:** ![stangri](https://forum.openwrt.org/user_avatar/forum.openwrt.org/stangri/32/58_2.png) [@stangri](https://forum.openwrt.org/u/stangri)\
**Post date:** [December 13, 2016, 5:16am UTC](https://forum.openwrt.org/t/adblock-support-thread/507/12 "2016-12-13T05:16:40Z")

</div>

> [@dibdot](#):
>
> Still it's all about dns spoofing/hijacking but we do not longer need all the firewall/pixel server stuff for that.

By DNS hijacking I meant that if I have a client in the local network with hardcoded DNS (rather than using DNS server offered by DHCP) it will no longer be forced to use my router's dns server, will it now, without firewall rules?

> [@dibdot](#):
>
> As I wrote in my initial post you have to set two options in adblock config, for uclient-fetch use the following

Ah, sorry, missed that, I was hoping adblock2 would auto-discover what I have installed. 😉

---

<div class="post-metadata">

**Author:** ![dibdot](https://forum.openwrt.org/user_avatar/forum.openwrt.org/dibdot/32/3100_2.png) [@dibdot](https://forum.openwrt.org/u/dibdot)\
**Post date:** [December 13, 2016, 3:07pm UTC](https://forum.openwrt.org/t/adblock-support-thread/507/13 "2016-12-13T15:07:22Z")

</div>

> [@stangri](#):
>
> By DNS hijacking I meant that if I have a client in the local network with hardcoded DNS (rather than using DNS server offered by DHCP) it will no longer be forced to use my router's dns server, will it now, without firewall rules?

adblock supports a wider range of router modes, incl. AP modes. Therefore it makes no sense to set firewall redirects like that. (same applies to adblock 1.x)

> [@stangri](#):
>
> Ah, sorry, missed that, I was hoping adblock2 would auto-discover what I have installed.

a guy who changed the default ssl-backend can add two config options, too. 🙂  
a positive side effect: you could use other tools like aria2 ...

---

<div class="post-metadata">

**Author:** ![stangri](https://forum.openwrt.org/user_avatar/forum.openwrt.org/stangri/32/58_2.png) [@stangri](https://forum.openwrt.org/u/stangri)\
**Post date:** [December 14, 2016, 12:11am UTC](https://forum.openwrt.org/t/adblock-support-thread/507/14 "2016-12-14T00:11:33Z")

</div>

> [@dibdot](#):
>
> adblock supports a wider range of router modes, incl. AP modes. Therefore it makes no sense to set firewall redirects like that. (same applies to adblock 1.x)

Ah, I see the reason. It'd still make sense to set the redirects for the router mode, which I'd expect to be like 90% of the cases. 😉

---

<div class="post-metadata">

**Author:** ![dibdot](https://forum.openwrt.org/user_avatar/forum.openwrt.org/dibdot/32/3100_2.png) [@dibdot](https://forum.openwrt.org/u/dibdot)\
**Post date:** [December 16, 2016, 5:01pm UTC](https://forum.openwrt.org/t/adblock-support-thread/507/15 "2016-12-16T17:01:14Z")

</div>

I've updated the download link in the first post for the new pre1 version, changes are:

- procd fine tuning
- many bugfixes

If nothing major comes up, I'll send a github PR before christmas ... 🙂

---

<div class="post-metadata">

**Author:** ![WildByDesign](https://forum.openwrt.org/user_avatar/forum.openwrt.org/wildbydesign/32/41649_2.png) [@WildByDesign](https://forum.openwrt.org/u/WildByDesign)\
**Post date:** [December 17, 2016, 2:36pm UTC](https://forum.openwrt.org/t/adblock-support-thread/507/16 "2016-12-17T14:36:41Z")

</div>

The initial adblock\_1.9.99-pre0-1\_all ran perfectly well for me. Now adblock\_1.9.99-pre1-1\_all is also running well perfectly for the past 12-14 hours or so. No issues to report on my end as far as functionality goes.

I must admit, I do wish that there still remained an option to keep the pixel server running to replace all of the DNS-related errors that come up now with this NXDOMAIN method. But anyway, I trust in your judgement and coding work 100% and I will continue testing all future releases as they are released.

---

<div class="post-metadata">

**Author:** ![dibdot](https://forum.openwrt.org/user_avatar/forum.openwrt.org/dibdot/32/3100_2.png) [@dibdot](https://forum.openwrt.org/u/dibdot)\
**Post date:** [December 17, 2016, 4:59pm UTC](https://forum.openwrt.org/t/adblock-support-thread/507/17 "2016-12-17T16:59:19Z")

</div>

> [@WildByDesign](#):
>
> I must admit, I do wish that there still remained an option to keep the pixel server running to replace all of the DNS-related errors that come up now with this NXDOMAIN method.

Hi Dave,

thanks for testing!  
Do you have example urls with "broken links" where ads are not delivered by https server? For ad related content from https server you will receive broken links, even with adblock 1.x cause we cannot redirect secured connections.

br  
dirk

---

<div class="post-metadata">

**Author:** ![cybrnook](https://forum.openwrt.org/user_avatar/forum.openwrt.org/cybrnook/32/209_2.png) [@cybrnook](https://forum.openwrt.org/u/cybrnook)\
**Post date:** [December 17, 2016, 6:21pm UTC](https://forum.openwrt.org/t/adblock-support-thread/507/18 "2016-12-17T18:21:27Z")

</div>

Just want to say thanks for this! I run your current version published in trunk (1.5.4-1 with the Luci counter part), and it's a great tool. Thanks for continuing to support it!

---

<div class="post-metadata">

**Author:** ![htmt](https://forum.openwrt.org/user_avatar/forum.openwrt.org/htmt/32/147_2.png) [@htmt](https://forum.openwrt.org/u/htmt)\
**Post date:** [December 19, 2016, 4:30pm UTC](https://forum.openwrt.org/t/adblock-support-thread/507/19 "2016-12-19T16:30:32Z")

</div>

Tested on my TP-Link Archer C2600 and my travel-router GLi AR150.  
Works like a charm! I love it.  
Especially the AR150 can handle this version much easier than the previous version.

---

<div class="post-metadata">

**Author:** ![hnyman](https://forum.openwrt.org/user_avatar/forum.openwrt.org/hnyman/32/19_2.png) [@hnyman](https://forum.openwrt.org/u/hnyman)\
**Post date:** [December 19, 2016, 5:04pm UTC](https://forum.openwrt.org/t/adblock-support-thread/507/20 "2016-12-19T17:04:09Z")

</div>

The LuCI app modified for the new adblock2 can be found from here:  
[https://www.dropbox.com/s/dobai5nfua5bifz/luci-app-adblock\_git-16.352.65143-1741e5578-1\_all.ipk?dl=0](https://www.dropbox.com/s/dobai5nfua5bifz/luci-app-adblock_git-16.352.65143-1741e5578-1_all.ipk?dl=0)

[Next page](https://forum.openwrt.org/t/adblock-support-thread/507.md?page=2)
