What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Status
Not open for further replies.
Thank you. I'll try that.

Is there any way to delete the current weekly stats?
Delete?
Do you mean disable the weekly stats?
rs 1 1
 
Ah, what I meant was this:

The stats show the current week. There is the option to show them "rs" I believe. What I'd like to do is sort of reset them. So that rs just shows me whatever happened after the last reset.
 
Ah, what I meant was this:

The stats show the current week. There is the option to show them "rs" I believe. What I'd like to do is sort of reset them. So that rs just shows me whatever happened after the last reset.
No, that is not a built in option. Weekly and current stats always count the current week since last update day.
The blocking file update on update day resets the stats to 0, and only in auto mode, meaning as a cron job.
The easiest way would be to turn logging off, then delete the /adblocking/logs/dnsmasq.log* files, there should be three of them.
Then turn logging back on, this creates a new dnsmasq.log file. The two others will be generated next day at 5:20 a.m. when the log files rotate.
 
Ah, what I meant was this:

The stats show the current week. There is the option to show them "rs" I believe. What I'd like to do is sort of reset them. So that rs just shows me whatever happened after the last reset.
There's also a manual way to run the update as auto mode.
Enter cj, this lists the cron jobs. Copy this part of the listed #UpdateHosts# line:
Code:
/tmp/mnt/<your device>/adblocking/addon/update-hosts.add cronjob
Then paste this into the terminal (not in AB) and hit enter. This updates the blocking file and resets the dnsmasq.log* files to 0 (the "cronjob" parameter does the reset).
No need to turn logging off this way.
 
Last edited:
The AB-Solution Manual now covers all steps and options from installation, the startup and the options in the main menu screen.

The sub menu options are in preparation and will be added soon.
 
I did it for my thousandth post, so I keep up this sort of tradition and celebrate herewith my 2000th post!

Which will label me as "Part of the furniture" hereabouts. Hmm.
 
I did it for my thousandth post, so I keep up this sort of tradition and celebrate herewith my 2000th post!

Which will label me as "Part of the furniture" hereabouts. Hmm.
You deserve it! Your knowledge and contributions to the community are greatly appreciated.
 
You deserve it! Your knowledge and contributions to the community are greatly appreciated.
Thank you for your praise.
And I would like to thank everyone on this board that helped me in any way getting where I am.
There is just so much knowledge packed into this unique and fascinating place that I can now rightfully call my home-on-the-internet.
On to the next thousand.
 
Happy to have been able to find this tidbit in the user manual:
..wildcard (*) entries are not possible. Domains with and without the www part are treated separately, e.g, www.domain.com and domain.com need to be added separately.
 
Hmmm - my (email) password contains a " - that seems to make AD Solution flip out somewhat....?
I have all sorts of special chars in my password, but not the character you're using.
And I can see that this is interpreted as being the end of the variable value, leaving the rest of it in limbo.
I'll look into it, but for now, just replace/remove it to make it work.
 
I have all sorts of special chars in my password, but not the character you're using.
And I can see that this is interpreted as being the end of the variable value, leaving the rest of it in limbo.
I'll look into it, but for now, just replace/remove it to make it work.

No worries, I just added an extra google mail account!
 
I have an idea - however if I am wrong in any way I write, please feel free to correct med :)

Above I read that wild cards are not possible in host names. And I can understand why since it is a host name based solution.

What I need is something like:

*.cloudfront.net
*.tnctrx.com

Both above creates a very large number of variants that will be hard to follow, since it today is a manual routine to add each and everyone to the current blacklist file...

Now, since the logfile dnsmasq.log seems to include all hosts requested (and I hope I am correct in that), why not add a function that every night/weekend/something goes thru the dnsmasq.log file, and by using wildcard search after patterns like the two I mentioned above, simply adds lines to the blacklist, or maybe a auto_blacklist file (so one knows the difference between wildcard additions and manual additions)?

If this is possible, one will - sooner or later - get the behavior of the wildcard into blacklist file (and of course re-load of that file and so on). It is not perfect, but hey, maybe better than nothing right?
 
I have an idea - however if I am wrong in any way I write, please feel free to correct med :)

Above I read that wild cards are not possible in host names. And I can understand why since it is a host name based solution.

What I need is something like:

*.cloudfront.net
*.tnctrx.com

Both above creates a very large number of variants that will be hard to follow, since it today is a manual routine to add each and everyone to the current blacklist file...

Now, since the logfile dnsmasq.log seems to include all hosts requested (and I hope I am correct in that), why not add a function that every night/weekend/something goes thru the dnsmasq.log file, and by using wildcard search after patterns like the two I mentioned above, simply adds lines to the blacklist, or maybe a auto_blacklist file (so one knows the difference between wildcard additions and manual additions)?

If this is possible, one will - sooner or later - get the behavior of the wildcard into blacklist file (and of course re-load of that file and so on). It is not perfect, but hey, maybe better than nothing right?
To code it, this would be something like this:
- add wildcard domain(s) to file wildcard_blocklist
- find all queries in dnsmasq log files for first entry in wildcard_blocklist and write it to a temp file
- repeat for every entry in wildcard_blocklist
Then:
- remove duplicates in temp file
- remove whitelist entries in temp file
- add it to auto_blacklist
- remove duplicates from auto_blacklist
- reload the auto_blacklist in dnsmasq

As you can see, this would be doable, but time consuming with a lot of entries in the wildcard_blocklist.
Is this about ad-blocking? Practically all ad domains are blocked by one of the hosts files in use in the blocking file.
And I wonder if it's worth the effort.
 
To code it, this would be something like this:
- add wildcard domain(s) to file wildcard_blocklist
- find all queries in dnsmasq log files for first entry in wildcard_blocklist and write it to a temp file
- repeat for every entry in wildcard_blocklist
Then:
- remove duplicates in temp file
- remove whitelist entries in temp file
- add it to auto_blacklist
- remove duplicates from auto_blacklist
- reload the auto_blacklist in dnsmasq

As you can see, this would be doable, but time consuming with a lot of entries in the wildcard_blocklist.
Is this about ad-blocking? Practically all ad domains are blocked by one of the hosts files in use in the blocking file.
And I wonder if it's worth the effort.

Just a thought, have you checked how Pi-Hole handles wildcard blocking? (https://github.com/pi-hole/pi-hole)

I think they do it using a dnsmasq conf file called 03-pihole-wildcard.conf with a syntax like address=/domain.com/0.0.0.0 (IP address of the Pi-hole). Might not be possible with AB-Solution but I run a Pi-Hole at home as well so I thought I'd mention it...
 
Just a thought, have you checked how Pi-Hole handles wildcard blocking? (https://github.com/pi-hole/pi-hole)

I think they do it using a dnsmasq conf file called 03-pihole-wildcard.conf with a syntax like address=/domain.com/0.0.0.0 (IP address of the Pi-hole). Might not be possible with AB-Solution but I run a Pi-Hole at home as well so I thought I'd mention it...
I know about the address=/domain.com/0.0.0.0 type of blocking domains and I have had that discussion several times. It's not coming to AB, sorry.
It will not allow you to whitelist a sub domain of domain.com, say good.domain.com.
Simply is impossible that way. Hence my little write-up of how I would code it to allow the whitelist entries to still work.
 
Hi there @thelonelycoder I have a small problem with absolution 3.8 on my ac68u running 380.65_4. The log shows this:
Code:
Apr 19 02:04:58 : AB-Solution: file 5 download failed or file is not hosts file, using backup file
Apr 19 02:05:05 : AB-Solution updated blocking file, 69075 domains are now blocked
Apr 19 02:05:09 : AB-Solution counted ads before log files reset (triggered by update-hosts.add)
Apr 19 02:05:09 : AB-Solution blocked 9,299 total 9,299 week 702 new ads
Apr 19 02:05:09 : AB-Solution rotated dnsmasq log files
User name deleted for privacy.
The line I'm worried about is the first one saying the 5th file is not a hosts file. When I run ab-solution.sh I see that I have 5 hosts files in the header a the top.
Any ideas what is going on?
Is it normal to have 5 hosts files?
 
Last edited:
Status
Not open for further replies.

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!

Staff online

Top