Adblock support thread

Most likely that function "procd_add_interface_trigger" has been added to procd after Barrier Breaker 14.07, either in CC15.05 or even later. BB14.07 is totally deprecated.

That is just the reason why new packages are usually not backported to ancient releases...

Thanks @hnyman

@dibdot

Hi, I'm getting dnsmasq fault when using adblock on 2.6.4.

Thu May 18 20:02:00 2017 daemon.info dnsmasq[3099]: using 73402 more local addresses
Thu May 18 20:02:00 2017 daemon.info dnsmasq[3099]: read /etc/hosts - 4 addresses
Thu May 18 20:02:00 2017 daemon.info dnsmasq[3099]: read /tmp/hosts/odhcpd - 1 addresses
Thu May 18 20:02:00 2017 daemon.info dnsmasq[3099]: read /tmp/hosts/dhcp.cfg02411c - 2 addresses
Thu May 18 20:02:07 2017 kern.info kernel: [  258.973534] do_page_fault(): sending SIGSEGV to dnsmasq for invalid read access from 00000000
Thu May 18 20:02:07 2017 kern.info kernel: [  258.982955] epc = 0040da75 in dnsmasq[400000+26000]
Thu May 18 20:02:07 2017 kern.info kernel: [  258.987884] ra  = 0040da63 in dnsmasq[400000+26000]
db_list.adaway       adb_list.disconnect   adb_list.malware      adb_list.openphish    adb_list.spam404      adb_list.whocares     adb_list.winspy
adb_list.adguard      adb_list.dshield      adb_list.malwarelist  adb_list.ransomware   adb_list.sysctl       adb_list.winhelp      adb_list.yoyo

I doubt that this error has something to do with the latest adblock update. Probably it's related to the latest dnsmasq updates in trunk ... this SIGSEGV is dnsmasq internal since the return address (ra) points always to dnsmasq itself.

Tested under TP-Link TL-WDR3600 v1, LEDE Reboot 17.01.1:

Great application, package and interface. I have been using Adblock applet in browsers for years. It did not fully work as some websites detect addblock in browsers.

Now that I tested adblock2 in LEDE, I will never go back. This works so nice ! I don't see even traces of adds. They are all gone. This is fantastic.

When I visit a website A for product "Z", I notice that website B displays adds for product "Z". Will it also block tracing?

adblock startup takes 5 minutes :slight_smile:

Wed Jun 7 10:26:33 2017 user.notice adblock-[2.6.2] info : start adblock processing ...
Wed Jun 7 10:31:58 2017 user.notice adblock-[2.6.2] info : block lists with overall 108746 domains loaded successfully (LEDE Reboot 17.01.1 r3316-7eb

It would be nice if addblock could start using the old block files and upgrade them later on ...

You mean some kind of "manual" mode where adblock uses the old block lists as long as the user did a manual update? Prerequisite is that your blocklist are on a real (non-volatile) disk.

Anyway, thanks for your feedback.

Update:
I've slightly pimped the backup function to support the new "Manual mode" ... if enabled normal "start" action will use backups (if present), without backups adblock will download fresh lists as usual. "reload" or "restart" actions will get fresh lists as well. I will push this version later this evening or tomorrow after some more tests.

1 Like

Oh it is great, thanks. Pardon my ignorance, I did not realize that blocklist was stored on volatile memory.

update 2.7.0 is now in trunk (see first post for download links).

I upgraded, this works very well, thanks!

I'm on Adblock 2.7.1 w/latest trunk and Adblock isn't starting at boot, I checked /etc/rc.d and it shows S50adblock which seems to be correct according to the last info in this thread, I went ahead and ran /etc/init.d/adblock disable/enable just to see if it would call a new one and it didn't (remains S50adblock), wan is listed as the triggered interface. Just wondering if @didbot or anyone has any ideas, here are my global settings -

config adblock 'global'
	option adb_debug '0'
	option adb_forcesrt '0'
	option adb_forcedns '0'
	option adb_iface 'wan'
	option adb_triggerdelay '2'
	option adb_whitelist '/etc/adblock/adblock.whitelist'
	option adb_whitelist_rset '\$1 ~/^([A-Za-z0-9_-]+\.){1,}[A-Za-z]+/{print tolower(\"^\"\$1\"\\\|[.]\"\$1)}'
	option adb_rtfile '/tmp/adb_runtime.json'
	option adb_manmode '0'
	option adb_backup '1'
	option adb_backupdir '/mnt/storage/adblock'
	option adb_enabled '1'

Default lists are enabled (adaway/disconnect/yoyo). Also, Adblock starts fine manually with init or at boot if put in rc.local

edit - there was nothing in logs with debug logging enabled

Hi, add an (additional) lan trigger interface, e.g.

option adb_iface 'wan lan'

and retry ... maybe you have to raise the trigger delay, too.

good luck!

1 Like

Thanks @didbot, adding wan6 got it working (left trigger delay at 2).

Hi, good day

I have the following situation (for those who have interest in my background history).

In my girlfriend's house, i have Adblock running on my router very well and I very happy with it (many thanks for the developers for the hard work), recently, my girl's mom got an android tablet and became to download games on it, then she get obsess with a solitaire game full of ads. Usually she don't play at her home but recently she start to play with her android tablet at home, then she notice that the solitaire game refuse to load in her home (soon i discovered that the game refuse to load if it can't get and ad from the Internet), I've tried to convince her to change to a less invasive solitaire game (in terms of ads) but she refuse (because she had her progress in this game, because she likes more this game,.....). At the end, I recently ended up disabling the Adblock module because she can't play her full of ads game at her home

My question is, Is there a way that I can allow only one ip address or selective ip address to be non block by Adblock?

Greetings, and again, thanks for all the hard work.

Simply use a static ip address on this tablet and assign a non-local DNS server (like 8.8.8.8). In this case please do not use the "Force local DNS" switch in adblock or any other firewall rule that redirect port 53 to your local resolver.

@dibdot That completely solve my problem, many thanks.

I have been using adblock with luci-app-adblock with great success. Only a few questions/remarks:

  1. Optional: force dns requests to local resolver may rewrite all DNS queries in the network subrange. As this is based no iptables rules, firewall rules are not deleted upon removal of adblock. If not already in documentation, this should be documented.
  2. There are probably marvelous features to develop around "edit blacklist" and "edit whitelist". As I understand, these are in fact personal blacklists. Maybe they should be linked to some kind of "honeypot" feature. For example sshguard.

For example, ssh-guard can write to /etc/host.allow:
https://www.sshguard.net/docs/setup/#tcp-wrapper

So if we could move /etc/host.allow between those two lines, this could also inform whitelist and blacklist.
This is just an example, there are many other tools.

Maybe fail2ban is a better approach then sshguard to handle a honeypot:
https://www.fail2ban.org/wiki/index.php/Main_Page

Besides, sshguard is written in pure C and therefor lightwise.
I will integrate it in LEDE as a first package experience.

1 Like

Maybe I didn't get your point, sshguard is an IP-based log parser / blocking utility - adblock on the other hand only relies on (sub-)domains, could you clarify your "honeypot feature"? Thanks.

Hi there,

I have installed your AdBlock on my new Turris Omnia. But now im strugling with the Setup because i get an Error Message:

adblock[27192] info : AP mode detected, please set local LuCI instance to ports <> 80/443

I think the Solution to Set the Port diffrent would be one of the least... right? Is there any better Solution? Or when no how can i change this? Havn't found andy Infos about this :frowning:

thanks for your help

Hi,

where did you find this ancient version of adblock?:astonished:
For current adblock releases please check the first post, install the latest snapshot release, read the online doc and go from there ...

To my knowledge the Turris router uses its own DNS resolver (knot) and this backend is currently not supported. You can use dnsmasq, unbound or bind as DNS backend by now. If you need proper knot support, contact me by mail (see online doc).