Block youtube ADs with PiHole blacklist
-
DNSBL->DNSBL Groups create NEW group
Use https://raw.githubusercontent.com/kboghdady/youTube_ads_4_pi-hole/master/youtubelist.txt
as source, got it from https://github.com/kboghdady/youTube_ads_4_pi-hole
Reload pfBlockerNG, try some browser and open Youtube.P.S. Works fine on the different browsers but not on the android Youtube app.
Edited, URL fixed, thanks provels -
@w0w
I'll have to try that. Not pfSense related and not spam, but I've found a YouTube player app that works for ad blocking on Android, SmartTubeNext. It works on my TV box, but that's the only Android I have.Be sure to use the
https://raw.githubusercontent.com/kboghdady/youTube_ads_4_pi-hole/master/youtubelist.txt
source.
-
Not bad, but uBlock Origin is still the best out there for ad-blocking :)
-
I tried this and watched a couple videos, then the "Video will play after ad" appeared. No expert here.
-
@provels
I think there are some DNS records are missing in the list or google updates them dynamically. So yes, sometimes it fails to block ads, but mostly it works.
I've found some python regex list for PiHole, but it does not work correctly for me, videos just refused to load. -
Why not use an adblocker in the browser instead??
Or use the lists from there?
-
@cool_corona
I have experienced that sites can detect the adblocker running in the browser.
And some sites are not happy.But the most important reason i use pi-hole, is that it is "site (vlan) wide".
No need for adblocker or ....
And i can add my own blocks easily./Bingo
-
For me it broke YouTube. Videos that start with an add never play. Had to remove the list.
-
@cool_corona
Sometimes it's not possible. You just can't force user to use it. -
@w0w Do you use that list on anything that is not a browser client?
Had such a list in PiHole and used it on Chromecasts, Android TVs etc. and no device with a YouTube App worked anymore as the preroll Ads won't show and the actual video doesn't get triggered then. Even looking at 2min black screen it doesn't skip to the video. Was the same as @AndyRH and had to remove the list for the TVs and FireTVs as neither did work (yes of course a few videos get played when there's no ads/monetization on them, but most do today).
Cheers
-
@jegr
it still showing Ads and videos on the Youtube App on all android devices I have tried. But if I use any android browser client instead of app, no more Ads displayed on the Youtube.
Don't know maybe Google uses same servers for streaming Ads and videos in different countries or maybe some other settings in pfBlockerNG have been changed. My Whitelist containss3.amazonaws.com s3-1.amazonaws.com # CNAME for (s3.amazonaws.com) .github.com .githubusercontent.com github.map.fastly.net # CNAME for (raw.githubusercontent.com) .gitlab.com .apple.com .sourceforge.net .fls-na.amazon.com # alexa .control.kochava.com # alexa 2 .device-metrics-us-2.amazon.com # alexa 3 .amazon-adsystem.com # amazon app ads .px.moatads.com # amazon app 2 .wildcard.moatads.com.edgekey.net # CNAME for (px.moatads.com) .e13136.g.akamaiedge.net # CNAME for (px.moatads.com) .secure-gl.imrworldwide.com # amazon app 3 .pixel.adsafeprotected.com # amazon app 4 .anycast.pixel.adsafeprotected.com # CNAME for (pixel.adsafeprotected.com) .bs.serving-sys.com # amazon app 5 .bs.eyeblaster.akadns.net # CNAME for (bs.serving-sys.com) .bsla.eyeblaster.akadns.net # CNAME for (bs.serving-sys.com) .adsafeprotected.com # amazon app 6 .anycast.static.adsafeprotected.com # CNAME for (static.adsafeprotected.com) google.com www.google.com youtube.com www.youtube.com s.youtube.com youtube-ui.l.google.com # CNAME for (youtube.com) stackoverflow.com www.stackoverflow.com dropbox.com www.dropbox.com www.dropbox-dns.com # CNAME for (dropbox.com) .adsafeprotected.com control.kochava.com secure-gl.imrworldwide.com pbs.twimg.com # twitter images www.pbs.twimg.com # twitter images cs196.wac.edgecastcdn.net # CNAME for (pbs.twimg.com) cs2-wac.apr-8315.edgecastdns.net # CNAME for (pbs.twimg.com) cs2-wac-us.8315.ecdns.net # CNAME for (pbs.twimg.com) cs45.wac.edgecastcdn.net # CNAME for (pbs.twimg.com)
I think it is default. I've added only s.youtube.com entry, but it does not matter. It works the same way with or without it.
-
My android phone refuses to use the DNS server provided by the DHCP when using Youtube app..
Through firewall logs, I can see it using 8.8.8.8.. So it's bypassing DNSBL completely..It seems that my chromecast is doing the same thing:
-
@mcury
I've captured some packets and for me it looks like now Youtube App uses some version of DNS over HTTPS. I don't see public DNS server IPs in captured data -
@w0w
If that is the case, there DoH blocklists in pfBlockerNG. Or maybe I got them from GitHub, been a while.
https://raw.githubusercontent.com/oneoffdallas/dohservers/master/list.txt
https://raw.githubusercontent.com/Sekhan/TheGreatWall/master/TheGreatWall.txt
That, and setting a rule for all LAN DNS requests to loop back to the FW might work. -
@provels
Added both and now Youtube App never plays videos with Ads -
@andyrh said in Block youtube ADs with PiHole blacklist:
For me it broke YouTube. Videos that start with an add never play. Had to remove the list.
Same for me. The DoH lists seem to be working fine, though.