Simple-adblock: fast, lean and fully uci/luci configurable AdBlocking


#63

The blocking does work when I use the router to do like nslookups or whatnot, it just doesn't work on any devices on my network. That should be a huge hint for what's going on. I'm happy to grab anything that would help, I'm really depserate to block Samsung domains to stop the spying, but also really want all this on one piece of hardware.

I'll give the other one a try soon, thanks!


#64

Sorry, are you talking about "davidc's" adblock build or firmware build? I have the wrt1900ac


#65

I ended up using this, which seems to work fine https://github.com/openwrt/packages/tree/master/net/adblock/files


#66

Firmware.... https://davidc502sis.dynamic-dns.net/
I'm using "adblock 3.5.2-1" and as i said Domain blocking is working fine for me with Davidc's latest build.


#67

Most likely it's because these devices have their own DNS cache and the previous (valid) IP addresses were stored in the cache. Rebooting the device (or manually resetting DNS cache) usually helps.


#68

I assumed so, then I pulled out a few of my old phones, used incognito mode, and verified it was using the right dns using a terminal emulator and checking ifconfig. It would still access the blocked sites with easy-adblock and was unable to access them when I set up adblock.

Well, either way I have a working solution for my problem with samsung forcing ads onto my TV and spying on me!

I will play with david's firmware you linked out of curiosity


#69

I've updated the information service stores in ubus, hence I've updated the WebUI to better reflect the status of the service and show any errors (if any occurred) and also made a minor improvement in service start/stop and reload usability in WebUI.

I would appreciate feedback. If you come by anything unusual, post the screenshots of the WebUI + output of logread -e simple-adblock.


#70

I verify that clearing the DNS Cache is a necessary step on a Ubuntu PC (and I'm certain on Windows, too):

  • I boot the router with Adblock enable = 0
  • I go to site with ads
  • I enable Adblock = 1 and reload
  • I can still browse to the sites and ads already loaded in cache
  • I disconnect the Ethernet cable from the client until it shows as disconnected
  • I plug in the Ethernet cable
  • When I browse to a site with ads, they no longer appear

On a Windows PC, run:

ipconfig /flushdns


#71
root@Archer_C7:~# logread -e simple-adblock
Thu Jul 12 15:13:28 2018 user.notice simple-adblock [2487]: Reloading simple-adblock 1.6.3-0...
Thu Jul 12 15:13:29 2018 user.notice simple-adblock [2487]: [DL] Blocked Domains: localhost [✓]
Thu Jul 12 15:13:30 2018 user.notice simple-adblock [2487]: [DL] Blocked Domains: s3.amazonaws.com [✓]
Thu Jul 12 15:13:30 2018 user.notice simple-adblock [2487]: [DL] Blocked Hosts: raw.githubusercontent.com [✓]
Thu Jul 12 15:13:30 2018 user.notice simple-adblock [2487]: [DL] Blocked Domains: ssl.bblck.me [✓]
Thu Jul 12 15:13:31 2018 user.notice simple-adblock [2487]: [DL] Blocked Hosts: adaway.org [✓]
Thu Jul 12 15:13:31 2018 user.notice simple-adblock [2487]: [DL] Blocked Hosts: pgl.yoyo.org [✓]
Thu Jul 12 15:13:32 2018 user.notice simple-adblock [2487]: [DL] Blocked Domains: dshield.org [✓]
Thu Jul 12 15:13:32 2018 user.notice simple-adblock [2487]: Sorting combined list [✓]
Thu Jul 12 15:13:34 2018 user.notice simple-adblock [2487]: Optimizing combined list [✓]
Thu Jul 12 15:13:34 2018 user.notice simple-adblock [2487]: Whitelisting domains [✓]
Thu Jul 12 15:13:34 2018 user.notice simple-adblock [2487]: Formatting merged file [✓]
Thu Jul 12 15:13:34 2018 user.notice simple-adblock [2487]: Creating dnsmasq config [✓]
Thu Jul 12 15:13:34 2018 user.notice simple-adblock [2487]: Removing temporary files [✓]
Thu Jul 12 15:13:39 2018 user.notice simple-adblock [2487]: Restarting dnsmasq [✓]
Thu Jul 12 15:13:39 2018 user.notice simple-adblock [2487]: service is blocking 5634 domains ✓
Thu Jul 12 15:13:40 2018 daemon.info procd: Not starting instance simple-adblock::instance1, command not set
Thu Jul 12 15:13:40 2018 user.notice simple-adblock [3010]: service is blocking 5634 domains ✓
Thu Jul 12 15:13:40 2018 daemon.info procd: Not starting instance simple-adblock::instance1, command not set
Thu Jul 12 15:13:40 2018 user.notice simple-adblock [3389]: service is blocking 5634 domains ✓
Thu Jul 12 15:13:40 2018 daemon.info procd: Not starting instance simple-adblock::instance1, command not set
Thu Jul 12 15:13:51 2018 user.notice simple-adblock [4137]: service is blocking 5634 domains ✓
Thu Jul 12 15:13:51 2018 daemon.info procd: Not starting instance simple-adblock::instance1, command not set
Thu Jul 12 15:14:05 2018 user.notice simple-adblock [4674]: service is blocking 5634 domains ✓
Thu Jul 12 15:14:05 2018 daemon.info procd: Not starting instance simple-adblock::instance1, command not set

Are the "command not set" notices considered unusual?


#72

I'm aware of that, sadly without starting actual daemon, I don't know how to get rid of it: PROCD service -- how to push status to ubus?.


#73

Fixed in simple-adblock 1.6.3-1 thanks to jow!


#74

Nice. I also noticed a minor formatting inconsistency with status symbol lacking square brackets upon reporting number of blocked domains (lines 374 and 377 in init need extra underscores around OK and FAIL?). Otherwise, all is good. :+1:

root@Archer_C7:~# /etc/init.d/simple-adblock restart
Stopping simple-adblock 1.6.3-1...
Restarting dnsmasq [✓]
simple-adblock 1.6.3-1 stopped.
Starting simple-adblock 1.6.3-1...
Found existing data file, reusing it [✓]
Restarting dnsmasq [✓]
simple-adblock 1.6.3-1 is blocking 5634 domains ✓

#75

Thank you for noticing. Fixed in simple-adblock 1.6.3-2.


#76

Hi.

Running simple-adblock on a tl-wdr4300 with OpenWrt 18.06.0-rc2.
In Services menu I have to two Simple AdBlock entries.
First points to /cgi-bin/luci/admin/services/simpleadblock (looks outdated).
Second points to /cgi-bin/luci/admin/services/simple-adblock.

Package: simple-adblock
Version: 1.6.3-5

Package: luci-app-simple-adblock
Version: git-18.201.34715-c813598-15

Regards


#77

Same issue occurs with latest OpenWRT trunk.


#78

@n8b, @shamoi -- does rm -rf /var/luci-modulecache/; rm -f /var/luci-indexcache; or router reboot help?


#79

@stangri - tried all - still two entries in Services.


#80

Thanks for your prompt reply. What does ls /usr/lib/lua/luci/controller/simple*.lua say?


#81

root@wdr4300:~# ls /usr/lib/lua/luci/controller/simple*.lua
/usr/lib/lua/luci/controller/simple-adblock.lua /usr/lib/lua/luci/controller/simpleadblock.lua


#82

Well, no idea why the old controller file wasn't removed, but this should help:

rm -f /usr/lib/lua/luci/controller/simpleadblock.lua
rm -rf /var/luci-modulecache/; rm -f /var/luci-indexcache;