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!

just curious. Does this block Youtube Video Ads that we can see on our Mobile when the Mobile is connected to Wireless?
Nope. These ads need a more sophisticated approach to remove than just hosts file entries.
 
@thelonelycoder would it really be that much extra work to maintain a fork of the original with your addons to?
Everytime there was a major stable version you would just merge the changes into your branch and that would be it?
If I would think it were that simple I would do it.
 
If you will integrate in the future this please keep also a non integrated solution because there are people which are using different FW (John, HGG, etc) with AB-Solution
 
If you will integrate in the future this please keep also a non integrated solution because there are people which are using different FW (John, HGG, etc) with AB-Solution
One of the reasons not to do a firmware release. It would be a major letdown for you folks.
 
hmm even add blocker plus blocks youtube ads :/
i thought this solution would block those pesky ads.... as they sure are annoying...
 
hmm even add blocker plus blocks youtube ads :/
That's a blocker that runs on your Computer and can do all sorts of things that your router simply is not capable of.
 
Sent you a PM buddy to maybe get your eyes on something I am working on for DD-WRT.
 
just curious. Does this block Youtube Video Ads that we can see on our Mobile when the Mobile is connected to Wireless?

https://pi-hole.net/faq/what-domains-do-i-need-to-blacklist-for-youtube-to-work/

Block these addresses:
Code:
r4---sn-vgqs7nez.googlevideo.com
r4.sn-vgqs7nez.googlevideo.com
www.youtube-nocookie.com
youtube-ui.l.google.com
i1.ytimg.com
r17---sn-vgqsenes.googlevideo.com
r2---sn-vgqs7n7k.googlevideo.com
clients6.google.com
r1---sn-vgqsen7z.googlevideo.com
r1.sn-vgqsen7z.googlevideo.com
r20---sn-vgqs7ne7.googlevideo.com
r20.sn-vgqs7ne7.googlevideo.com
 
Can anyone confirm this works, it's an entry from 2016-04-28 in the Pi-hole FAQ.
You will have to add this into blacklist.txt and then run (p) in AB-Solution to read them in:
Code:
0.0.0.0 r4---sn-vgqs7nez.googlevideo.com
0.0.0.0 r4.sn-vgqs7nez.googlevideo.com
0.0.0.0 www.youtube-nocookie.com
0.0.0.0 youtube-ui.l.google.com
0.0.0.0 i1.ytimg.com
0.0.0.0 r17---sn-vgqsenes.googlevideo.com
0.0.0.0 r2---sn-vgqs7n7k.googlevideo.com
0.0.0.0 clients6.google.com
0.0.0.0 r1---sn-vgqsen7z.googlevideo.com
0.0.0.0 r1.sn-vgqsen7z.googlevideo.com
0.0.0.0 r20---sn-vgqs7ne7.googlevideo.com
0.0.0.0 r20.sn-vgqs7ne7.googlevideo.com
And if you run the 1.08-beta, add the ipv6 entries as well:
Code:
:: r4---sn-vgqs7nez.googlevideo.com
:: r4.sn-vgqs7nez.googlevideo.com
:: www.youtube-nocookie.com
:: youtube-ui.l.google.com
:: i1.ytimg.com
:: r17---sn-vgqsenes.googlevideo.com
:: r2---sn-vgqs7n7k.googlevideo.com
:: clients6.google.com
:: r1---sn-vgqsen7z.googlevideo.com
:: r1.sn-vgqsen7z.googlevideo.com
:: r20---sn-vgqs7ne7.googlevideo.com
:: r20.sn-vgqs7ne7.googlevideo.com
 
Can anyone confirm this works, it's an entry from 2016-04-28 in the Pi-hole FAQ.
You will have to add this into blacklist.txt and then run (p) in AB-Solution to read them in:
And if you run the 1.08-beta, add the ipv6 entries as well:

Have put in both of these (use 1.08 although I don't have IPv6 connection) but still get adverts using the YouTube app on my phone :(
 
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.
Actually I think you might be able to.
According to https://github.com/pi-hole/pi-hole/issues/165
"Pi-Hole uses Google's DNS servers. You can change that in /etc/dnsmasq.conf. The section you need to change is server=8.8.8.8 to server= and then the IP's for OpenDNS. You may need to sudo nano /etc/dnsmasq.conf to edit the file, and then sudo systemctl restart dnsmasq to reload the configuration after you do the updates."

So why not just in the router, point your devices to the Pi-Hole, and in the Pi-Hole, change the 8.8.8.8 and point is BACK at the router? This way the traffic goes to the pihole, then routed back to the router, where I am running DNS Crypt, where it will forward the DNS requests to my DNS crypt servers.

I had ordered my Pi this week with the hopes of doing this... Will have it soon to try. Do you think I wont be able to do this plan??

Also, I am getting an error after adding a few hosts. I added them with WinSCP text editor right on the server. Do you think it is an error with my Windows vs Unix new lines? If so, how do I add them? It shouldn't be the issue, because the script runs the command "sed $'s/\r$//'" to guard against it doesn't it?

The lines I added are:

# large hosts
cat >> $installDirPath/$scriptsDir/$updateHostsFile << EOF
# get hosts files and combine
wget -qO- \\
"http://winhelp2002.mvps.org/hosts.txt" \\
"http://someonewhocares.org/hosts/zero/hosts" \\
"http://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&startdate[day]=&startdate[month]=&startdate[year]=&mimetype=plaintext&useip=0.0.0.0" \\
"http://www.malwaredomainlist.com/hostslist/hosts.txt" \\
"http://support.it-mate.co.uk/downloads/hosts.txt" \\
"http://hosts-file.net/download/hosts.txt" \\
"http://pgl.yoyo.org/as/serverlist.php?hostformat=hosts&showintro=1&mimetype=plaintext" \\
"http://sysctl.org/cameleon/hosts.win" \\
"http://optimate.dl.sourceforge.net/project/adzhosts/HOSTS.txt" \\
"https://adaway.org/hosts.txt" \\
"http://adblock.gjtech.net/?format=unix-hosts" \\
"http://www.hostsfile.org/Downloads/hosts.txt" \\
"http://pastie.org/pastes/10910319/text" \\

> \$dir/temp1

EOF
fi

I know these files work well with Hostsman on Windows (I am switching from Hostsman program to router blocking)

The error I get was
hosts-adblock is NOT OK, file missing
 
Last edited:
Actually I think you might be able to.
According to https://github.com/pi-hole/pi-hole/issues/165
"Pi-Hole uses Google's DNS servers. You can change that in /etc/dnsmasq.conf. The section you need to change is server=8.8.8.8 to server= and then the IP's for OpenDNS. You may need to sudo nano /etc/dnsmasq.conf to edit the file, and then sudo systemctl restart dnsmasq to reload the configuration after you do the updates."

So why not just in the router, point your devices to the Pi-Hole, and in the Pi-Hole, change the 8.8.8.8 and point is BACK at the router? This way the traffic goes to the pihole, then routed back to the router, where I am running DNS Crypt, where it will forward the DNS requests to my DNS crypt servers.

I had ordered my Pi this week with the hopes of doing this... Will have it soon to try. Do you think I wont be able to do this plan??

Also, I am getting an error after adding a few hosts. I added them with WinSCP text editor right on the server. Do you think it is an error with my Windows vs Unix new lines? If so, how do I add them? It shouldn't be the issue, because the script runs the command "sed $'s/\r$//'" to guard against it doesn't it?

The lines I added are:

# large hosts
cat >> $installDirPath/$scriptsDir/$updateHostsFile << EOF
# get hosts files and combine
wget -qO- \\
"http://winhelp2002.mvps.org/hosts.txt" \\
"http://someonewhocares.org/hosts/zero/hosts" \\
"http://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&startdate[day]=&startdate[month]=&startdate[year]=&mimetype=plaintext&useip=0.0.0.0" \\
"http://www.malwaredomainlist.com/hostslist/hosts.txt" \\
"http://support.it-mate.co.uk/downloads/hosts.txt" \\
"http://hosts-file.net/download/hosts.txt" \\
"http://pgl.yoyo.org/as/serverlist.php?hostformat=hosts&showintro=1&mimetype=plaintext" \\
"http://sysctl.org/cameleon/hosts.win" \\
"http://optimate.dl.sourceforge.net/project/adzhosts/HOSTS.txt" \\
"https://adaway.org/hosts.txt" \\
"http://adblock.gjtech.net/?format=unix-hosts" \\
"http://www.hostsfile.org/Downloads/hosts.txt" \\
"http://pastie.org/pastes/10910319/text" \\

> \$dir/temp1

EOF
fi

I know these files work well with Hostsman on Windows (I am switching from Hostsman program to router blocking)

The error I get was
hosts-adblock is NOT OK, file missing

U can also leave the LAN dns settings empty, so it goes through router first and set pihole on the WAN DNS :)?


Sent from my iPhone using Tapatalk
 
Also, I am getting an error after adding a few hosts. I added them with WinSCP text editor right on the server. Do you think it is an error with my Windows vs Unix new lines? If so, how do I add them? It shouldn't be the issue, because the script runs the command "sed $'s/\r$//'" to guard against it doesn't it?
I pasted your code into ab-solution.sh and run it. Not a single error on my AC66U. But it took about 10 minutes to sort through the temp file (sort -u) and used 165MB of RAM. This might be a problem for your router. The resulting hosts-adblock file is 26MB and the router uses 132MB RAM to keep it in Memory. Way beyond what I would use in my opinion.
Also, if you run that update several times within a certain time frame some of the hosters WILL block your IP for a time. So this might just be a timeout of one of the hosters that brings your script down.
 

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