Ad-blocking and YouTube

Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions
Author Message
SisyphusBond
DD-WRT Novice


Joined: 26 Jan 2017
Posts: 38

PostPosted: Sun Nov 25, 2018 23:11    Post subject: Ad-blocking and YouTube Reply with quote
I wonder if anyone could help me understand something here?

Until a couple of months ago, I had a Netgear WNDRv2 router running a Kong build of dd-wrt from about 2016 or 2017 sometime (I think. I started around 2016 and upgraded it once or twice). It just died one day and refused to switch on properly anymore, so I've bought a new Netgear R7000 and I've installed a more recent Kong build on it.

On the old router I had been using the ad-blocking code from here (the bit further down) without any other modifications and it was pretty successful. I have tried to do the same on my new router and suddenly I'm getting adverts on YouTube constantly.

My confusion is that when I tried looking this up online, all I keep coming across is discussions and posts saying that it's not possible to block the Youtube adverts because they come from the same source as the videos themselves. Some of these comments go back years.

What I don't understand is how, if this is the case, my children had barely ever seen an advert on Youtube until I had to replace the router.

Could someone enlighten me?
Sponsor
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 5378
Location: UK, London, just across the river..

PostPosted: Mon Nov 26, 2018 7:18    Post subject: Reply with quote
hmm yep first make sure this script is working
than if needs add this command before the script
sleep 10
as well add the script in start-up instead of firewall
this lines are invalid remove them as those links are broiken

"http://jansal.googlecode.com/svn/trunk/adblock/hosts" \\
"http://adblock.gjtech.net/?format=hostfile" \\

i also noticed my very short scripts ware not working and D/L those host files to block ads so its either something to prevent it or updated ash/bash script that needs ad-script revoking or changing DL locations and ect....

also it might be a due to updated DNSmasq as there are reports in svn about ad-blocking problems with it...
https://svn.dd-wrt.com/ticket/6315

p.s. in fact this script above its working with those 2 lines removed, i test it also optimised it to save some space... but even thou its not executing all the links, although they are D/L
read hosts executes not all of them but only 3 very randomly and not more than 10000 ish
host names are added, so there must be a limit or something...wrong with DNSmasq i guess i ll post you a PM with this script i tried on the last Kong build 37845
just bear in mind this script need long time to load very long time...

ops you can fairly remove this line too

"http://someonewhocares.org/hosts/zero/hosts" \\

as it not executes it at all

_________________
Atheros
TP-Link WR740Nv1 ---DD-WRT 50500 WAP
TP-Link WR1043NDv2 -DD-WRT 50841 Gateway,DNS,AP Isolation,Ad-Block,Firewall,Forced DNS,DoT,VPN,VLAN
TP-Link WR1043NDv2 -DD-WRT 50841 Gateway,DNS,Ad-Block,Firewall,Forced DNS,DoT,VPN,VLAN
TP-Link WR1043NDv2 -Gargoyle OS 1.13.0 AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear R7800 --DD-WRT 50963 Gateway,DNS,AD-Block,AP&Net Isolation,VLAN's,Firewall,DoT,Vanilla
Netgear R9000 --DD-WRT 50927 Gateway,DNS,AD-Block,AP Isolation,Firewall,Forced DNS,DoT,2,4Ghz only,Vanilla
Broadcom
Netgear R7000 ---DD-WRT 50927 Gateway,DNS,AD-Block,Firewall,Forced DNS,VLAN's,DoT,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby for DNS over TLS I DNSCrypt v2 by mac913
SisyphusBond
DD-WRT Novice


Joined: 26 Jan 2017
Posts: 38

PostPosted: Wed Nov 28, 2018 17:04    Post subject: Reply with quote
Thanks for the pointers. I'll try to investigate those things properly later on in the week.

To return to my other point though, is it currently possible to block adverts on Youtube? Has the situation changed at all in the last few months?
Xeon2k8
DD-WRT Guru


Joined: 11 Feb 2016
Posts: 1286

PostPosted: Fri Nov 30, 2018 18:20    Post subject: Reply with quote
It's not possible anymore. I have a modified version of the script, which is only 10 lines and it works. But for YouTube is not possible to block ads because as you just said the ads come from for example: www.youtube.com/n4u8jgttji?source=ads... , while the video comes from: www.youtube.com/n4u8jgttji?source=vp9... (this is a silly example but i think you get the point).

So as hosts file block per domain base, and not with regular expressions like adblockers extensions, then there's no way around it.

_________________
R6400v2 (boardID:30) - Kong 36480 running since 03/09/18 - (AP - DNSMasq - AdBlocking - QoS)
R7800 - BS 31924 running since 05/26/17 - (AP - OpenVPN Client - DNSMasq - AdBlocking - QoS)
R7000 - BS 30771 running since 12/16/16 - (AP - NAS - FTP - SMB - OpenVPN Server - Transmission - DDNS - DNSMasq - AdBlocking - QoS)
R6250 - BS 29193 running since 03/20/16 - (AP - NAS - FTP - SMB - DNSMasq - AdBlocking)
SisyphusBond
DD-WRT Novice


Joined: 26 Jan 2017
Posts: 38

PostPosted: Fri Nov 30, 2018 19:05    Post subject: Reply with quote
And this is a recent change, right? Because I definitely still had them blocked in early September.
Xeon2k8
DD-WRT Guru


Joined: 11 Feb 2016
Posts: 1286

PostPosted: Fri Nov 30, 2018 19:10    Post subject: Reply with quote
SisyphusBond wrote:
And this is a recent change, right? Because I definitely still had them blocked in early September.

Exactly. I have this script setup on every router from my signature. When I bought and setup the R6400 in early September it stopped blocking them.

_________________
R6400v2 (boardID:30) - Kong 36480 running since 03/09/18 - (AP - DNSMasq - AdBlocking - QoS)
R7800 - BS 31924 running since 05/26/17 - (AP - OpenVPN Client - DNSMasq - AdBlocking - QoS)
R7000 - BS 30771 running since 12/16/16 - (AP - NAS - FTP - SMB - OpenVPN Server - Transmission - DDNS - DNSMasq - AdBlocking - QoS)
R6250 - BS 29193 running since 03/20/16 - (AP - NAS - FTP - SMB - DNSMasq - AdBlocking)
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 5378
Location: UK, London, just across the river..

PostPosted: Fri Nov 30, 2018 21:04    Post subject: Reply with quote
Xeon2k8 in your case this script you posted blocks/uses 10k ish host names, and this one i've, does 64k from a single host domain...
sadly past sept i had 200k ish almost, with another very short script ...now not working and forced to use 64k one...instead

_________________
Atheros
TP-Link WR740Nv1 ---DD-WRT 50500 WAP
TP-Link WR1043NDv2 -DD-WRT 50841 Gateway,DNS,AP Isolation,Ad-Block,Firewall,Forced DNS,DoT,VPN,VLAN
TP-Link WR1043NDv2 -DD-WRT 50841 Gateway,DNS,Ad-Block,Firewall,Forced DNS,DoT,VPN,VLAN
TP-Link WR1043NDv2 -Gargoyle OS 1.13.0 AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear R7800 --DD-WRT 50963 Gateway,DNS,AD-Block,AP&Net Isolation,VLAN's,Firewall,DoT,Vanilla
Netgear R9000 --DD-WRT 50927 Gateway,DNS,AD-Block,AP Isolation,Firewall,Forced DNS,DoT,2,4Ghz only,Vanilla
Broadcom
Netgear R7000 ---DD-WRT 50927 Gateway,DNS,AD-Block,Firewall,Forced DNS,VLAN's,DoT,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby for DNS over TLS I DNSCrypt v2 by mac913
Xeon2k8
DD-WRT Guru


Joined: 11 Feb 2016
Posts: 1286

PostPosted: Fri Nov 30, 2018 21:13    Post subject: Reply with quote
Alozaros wrote:
Xeon2k8 in your case this script you posted blocks/uses 10k ish host names, and this one i've, does 64k from a single host domain...
sadly past sept i had 200k ish almost, with another very short script ...now not working and forced to use 64k one...instead

10k 200k 20M doesn't matter. You can't block YouTube ads with hosts files Sad

_________________
R6400v2 (boardID:30) - Kong 36480 running since 03/09/18 - (AP - DNSMasq - AdBlocking - QoS)
R7800 - BS 31924 running since 05/26/17 - (AP - OpenVPN Client - DNSMasq - AdBlocking - QoS)
R7000 - BS 30771 running since 12/16/16 - (AP - NAS - FTP - SMB - OpenVPN Server - Transmission - DDNS - DNSMasq - AdBlocking - QoS)
R6250 - BS 29193 running since 03/20/16 - (AP - NAS - FTP - SMB - DNSMasq - AdBlocking)
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 5378
Location: UK, London, just across the river..

PostPosted: Sat Dec 01, 2018 9:01    Post subject: Reply with quote
to be honest i use a combination of adblocking stuff like win 7 hosts, ad blocker on router level and one in my browser and it works ok no ads at all
_________________
Atheros
TP-Link WR740Nv1 ---DD-WRT 50500 WAP
TP-Link WR1043NDv2 -DD-WRT 50841 Gateway,DNS,AP Isolation,Ad-Block,Firewall,Forced DNS,DoT,VPN,VLAN
TP-Link WR1043NDv2 -DD-WRT 50841 Gateway,DNS,Ad-Block,Firewall,Forced DNS,DoT,VPN,VLAN
TP-Link WR1043NDv2 -Gargoyle OS 1.13.0 AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear R7800 --DD-WRT 50963 Gateway,DNS,AD-Block,AP&Net Isolation,VLAN's,Firewall,DoT,Vanilla
Netgear R9000 --DD-WRT 50927 Gateway,DNS,AD-Block,AP Isolation,Firewall,Forced DNS,DoT,2,4Ghz only,Vanilla
Broadcom
Netgear R7000 ---DD-WRT 50927 Gateway,DNS,AD-Block,Firewall,Forced DNS,VLAN's,DoT,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby for DNS over TLS I DNSCrypt v2 by mac913
SisyphusBond
DD-WRT Novice


Joined: 26 Jan 2017
Posts: 38

PostPosted: Sat Dec 01, 2018 9:11    Post subject: Reply with quote
Oh I get no adverts on all the laptops in my house already. That is covered by various browser extensions.

It is the Smart TV that my kids now watch YouTube on that is my concern here.
Xeon2k8
DD-WRT Guru


Joined: 11 Feb 2016
Posts: 1286

PostPosted: Sat Dec 01, 2018 10:39    Post subject: Reply with quote
SisyphusBond wrote:
Oh I get no adverts on all the laptops in my house already. That is covered by various browser extensions.

It is the Smart TV that my kids now watch YouTube on that is my concern here.

Yeap same with my fire stick. Still applies what I said.

The issue with chromecast is that you have to have something streaming to it. For some people is fine, but doesn't float my boat.

_________________
R6400v2 (boardID:30) - Kong 36480 running since 03/09/18 - (AP - DNSMasq - AdBlocking - QoS)
R7800 - BS 31924 running since 05/26/17 - (AP - OpenVPN Client - DNSMasq - AdBlocking - QoS)
R7000 - BS 30771 running since 12/16/16 - (AP - NAS - FTP - SMB - OpenVPN Server - Transmission - DDNS - DNSMasq - AdBlocking - QoS)
R6250 - BS 29193 running since 03/20/16 - (AP - NAS - FTP - SMB - DNSMasq - AdBlocking)
tatsuya46
DD-WRT Guru


Joined: 03 Jan 2010
Posts: 7535
Location: YWG, Canada

PostPosted: Sat Dec 01, 2018 12:51    Post subject: Reply with quote
need a CONTENT blocker on the device itself to get rid of ads/tracking when the content comes from the same domain as the junk/tracking.

for domain blocking, id use, and do use, dnsmasq instead, much simpler to understand, does the same thing. assuming ur router isnt affected by https://svn.dd-wrt.com/ticket/6315 Rolling Eyes

_________________
LATEST FIRMWARE(S)

BrainSlayer wrote:
we just do it since we do not like any restrictions enforced by stupid cocaine snorting managers

[x86_64] Haswell i3-4150/QCA9984/QCA9882 ------> r50931 std
[QUALCOMM] DIR-862L --------------------------------> r50931 std
[QUALCOMM] DIR-862L --------------------------------> r50931 std
▲ ACTIVE / INACTIVE ▼
[QUALCOMM] WNDR4300 v1 --------------------------> r50485 std
[BROADCOM] DIR-860L A1 ----------------------------> r50485 std


Sigh.. why do i exist anyway.. | I love you Anthony.. never forget that.. my other 99% that ill never see again..

Eyerex
DD-WRT User


Joined: 11 Feb 2016
Posts: 198
Location: South London

PostPosted: Mon Dec 03, 2018 0:05    Post subject: Reply with quote
Hasn't YouTube changed the way it host's ads these days with them coming from the same address as the video you are watching so makes it harder to block via a host file
_________________
| Netgear Nighthawk X4S R7800 | Linksys WRT1900ACS V1 | Huawei Echolife HG612 3B |
Xeon2k8
DD-WRT Guru


Joined: 11 Feb 2016
Posts: 1286

PostPosted: Mon Dec 03, 2018 0:12    Post subject: Reply with quote
Eyerex wrote:
Hasn't YouTube changed the way it host's ads these days with them coming from the same address as the video you are watching so makes it harder to block via a host file

Read the thread

_________________
R6400v2 (boardID:30) - Kong 36480 running since 03/09/18 - (AP - DNSMasq - AdBlocking - QoS)
R7800 - BS 31924 running since 05/26/17 - (AP - OpenVPN Client - DNSMasq - AdBlocking - QoS)
R7000 - BS 30771 running since 12/16/16 - (AP - NAS - FTP - SMB - OpenVPN Server - Transmission - DDNS - DNSMasq - AdBlocking - QoS)
R6250 - BS 29193 running since 03/20/16 - (AP - NAS - FTP - SMB - DNSMasq - AdBlocking)
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum