What's new

AB-Solution 1.07 is out!

  • 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!

Does this block video ads? The ones your forced to play through before watching the video you want to see?
 
Does this block video ads? The ones your forced to play through before watching the video you want to see?
No, it does not. This is impossible to do with domain-blocking only.
 
Last edited:
Is there any benefit running something like 'pi-hole' alongside ab-solution? Have the resources available so, looking for every way to speed things up :)

I tried but somehow broke dns stuff and been at it for 4 hours.. Works for 30 min then down.. Then up... Something with ipv6 issues xD


Sent from my iPhone using Tapatalk
 
Is there any benefit running something like 'pi-hole' alongside ab-solution? Have the resources available so, looking for every way to speed things up :)

I tried but somehow broke dns stuff and been at it for 4 hours.. Works for 30 min then down.. Then up... Something with ipv6 issues xD


Sent from my iPhone using Tapatalk
You can't run both of them as Pi-Hole requires to set the dns server of your devices to be the Raspberry. This circumvents the router. In any case, Pi-Hole is a much more powerful app than my script can ever be by the sheer processing power difference between a Raspberry and a Router.
 
You can't run both of them as Pi-Hole requires to set the dns server to be the Raspberry. This circumvents the router. In any case, Pi-Hole is a much more powerful app than my script can ever be by the sheer processing power difference between a Raspberry and a Router.

Ah because I ran ur script for last week's (works great) and recently changed the wan dns to the pi-hole server (runs in a vm). Thanks for the quick response, will try and fiddle with it a bit more
 
Ah because I ran ur script for last week's (works great) and recently changed the wan dns to the pi-hole server (runs in a vm). Thanks for the quick response, will try and fiddle with it a bit more
If you have Pi-Hole running anyway just use that and not AB-Solution. You can do a lot more on the Pi than on the router. Pi-Hole is basically the same as AB-Solution, it just uses more hosts files. The memory and processing power of the router limit how much you can block before it gets sluggish with resolving domains.
 
@Mirabis just wanted to add. My Raspberry-Pi mostly sits powered off beside my main router. I'm just too proud of what I did with AB-Solution to have another device do the ad-blocking...
 
@Mirabis just wanted to add. My Raspberry-Pi mostly sits powered off beside my main router. I'm just too proud of what I did with AB-Solution to have another device do the ad-blocking...
Hehe yeah , i understand :) don't have a pi tho... All virtualization. Problem is , once the vm goes down.... I have no adblocking, so tried to have ab run as 2nd :)
 
Now it working... i found out i have to set DNS point to router's IP... Thanks!
Good, and if you let it set automatically it should also work.
 
Hehe yeah , i understand :) don't have a pi tho... All virtualization. Problem is , once the vm goes down....
And that's when your DNS Problem start again.
 
When I do that it says, can't open 'ab-solution.sh'
The script has been moved to the root of your device:
sh /tmp/mnt/<your device>/ab-solution.sh
 
Well, it's Tuesday morning again and my 2am Tuesday weekly update has resulted in a zero byte hosts-adblock file. I've reviewed the various posts in this thread so hopefully this info I send will help.

Also, in the past two weeks when this happened, a manual update "u" failed every time. Just seemed to hang forever. I recovered by doing a "Change" ("h") option and selecting the same Large Host file as I always do.

Here are some of the results from various commands I did:

:/tmp/mnt/sdb1/adblocking/scripts# cru l
00 02 * * 2 /tmp/mnt/sdb1/adblocking/scripts/update-hosts.sh #UpdateHosts#

and the permissions:
:/tmp/mnt/sdb1/adblocking/scripts# ls -l
-rwxr-xr-x 1 root 572 Apr 26 18:03 ab_dnsmasq_postconf.sh
-rwxr-xr-x 1 root 1441 May 3 10:08 update-hosts.sh

And the contents of the adblocking dir:


:/tmp/mnt/sdb1/adblocking# ls -l
drwxr-xr-x 2 root 1024 Apr 19 16:45 backup
-rw-r--r-- 1 root 208 May 10 02:00 blacklist.txt
-rw-r--r-- 1 root 0 May 10 03:39 hosts-adblock
drwxr-xr-x 2 root 1024 May 10 03:39 logs
drwxr-xr-x 2 root 1024 Apr 26 18:03 scripts
-rw-r--r-- 1 root 146 May 3 09:13 whitelist.bac
-rw-r--r-- 1 root 146 May 10 02:00 whitelist.txt


My USB is just called sdb1, but that has not changed in ages.

And the first several lines of update-hosts.sh

/tmp/mnt/sdb1/adblocking/scripts# cat update-hosts.sh
#!/bin/sh
# generated by AB-Solution 1.07

# set directory
dir=/tmp/mnt/sdb1/adblocking

# removing blank, empty and Windows EOL in white- and blacklist
sed -i '/^[[:blank:]]*$/d;s/\r$//' $dir/whitelist.txt
sed -i '/^[[:blank:]]*$/d;s/\r$//' $dir/blacklist.txt

# get hosts files and combine
wget -qO- \
"http://winhelp2002.mvps.org/hosts.txt" \


diagnostics per another comamnd:
/bin/mount | grep -E "ext2|ext3|ext4"

/dev/sdb1 on /tmp/mnt/sdb1 type ext3 (rw,nodev,relatime,errors=continue,user_xattr,barrier=0,data=ordered)
 
Following up to myself. I wonder if this may be the issue:

/tmp/mnt/sdb1/adblocking/scripts# sh update-hosts.sh
sort: standard output: No space left on device

Done.

The USB status on the router web page shows Available space 0.063GB and total space of 0.112GB.

So I wonder if the update process fails due to low space on the USB, but manually building the file new.
 
Very nice tool! Two small questions:
  1. Is there a reason why it does not completely live in /jffs? (apart from the log file). I get the impression there is no real need for an ubs device, except for the log (if used), or is the reason you don't want to write to /jffs too often (refreshing host files every week). Temp files (and even log) could be written to RAM and the whole solution would be independend from an external USB device.
  2. How does the crontab entry survives a reboot?
Thanks again.
 
Following up to myself. I wonder if this may be the issue:

/tmp/mnt/sdb1/adblocking/scripts# sh update-hosts.sh
sort: standard output: No space left on device

Done.

The USB status on the router web page shows Available space 0.063GB and total space of 0.112GB.

So I wonder if the update process fails due to low space on the USB, but manually building the file new.
How big is your hosts-adblock when it succeeds?
temp1 and temp2 as well as hosts-adblock exist in full size for a short time before the temp files are deleted.

Sorting takes the content from temp1 and writes it to temp2 then out of temp2 hosts-adblock is written.
So, while sorting you have at least twice the size of your hosts-adblock. That could be more than the available space on the device.
 

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!
Top