How to block ads for Youtube using DD-WRT ?

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware
Author Message
Julius2020
DD-WRT Novice


Joined: 31 Oct 2020
Posts: 9

PostPosted: Sat Oct 31, 2020 14:24    Post subject: How to block ads for Youtube using DD-WRT ? Reply with quote
I have a router Linksys EA2700 and I successfully installed dd-wrt on it.

My main router(UPC connect box) is from my ISP and I want to keep it as main and to add this linksys with dd-wrt as a repeater (for TV only) and enjoy watching Youtube on my TV without the annoying ads.

Would that work? Having the router turned into a repeater and still blocking the ads? If so, where could I find a good tutorial for setting it up?


Last edited by Julius2020 on Sat Oct 31, 2020 20:29; edited 1 time in total
Sponsor
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 6938
Location: Netherlands

PostPosted: Sat Oct 31, 2020 15:07    Post subject: Reply with quote
Welcome to the forum

To get the best out of DDWRT and the forum, read and follow the forum guidelines:
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
Please carefully read and follow the forum guidelines.

Following the forum guidelines I will transfer this to the appropriate forum for you.

What build do you use?

How are you connecting to your main router e,g, wired or wireless?
https://wiki.dd-wrt.com/wiki/index.php/Linking_Routers

Repeater will only bypass the router so it is difficult to do any ad blocking.

_________________
Routers:Netgear R7800, R6400v1, R6400v2, Linksys EA8500, EA6900 (XvortexCFE), E2000 (converted WRT320N), WRT54GS v1.
OpenVPN Policy Based Routing: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=321686
Install guide R6400v2:http://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
OpenVPN Server Setup:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=318795
Install guide R7800: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Wireguard Server setup guide:https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1183135
Wireguard Client setup guide:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324624
Wireguard Advanced setup guide:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324787
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
Julius2020
DD-WRT Novice


Joined: 31 Oct 2020
Posts: 9

PostPosted: Sat Oct 31, 2020 15:34    Post subject: Reply with quote
@egc

Build 44467

If, as a repeater, it won't do any ad blocking, then I should better connect by wire and link it to my main router and use it as a second router / access point. This way it would block ads, right?
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 6938
Location: Netherlands

PostPosted: Sat Oct 31, 2020 15:51    Post subject: Reply with quote
If you can connect by wire that is the preferred way and then just set it up as a default gateway , reset to defaults and set the Local IP address (which is default 192.168.1.1) different and outside the subnet of your main router.

so if your main router is on 192.168.1.1 / 255.255.255.0 set the local IP address at 192.168.2.1 and you should be good.

Then research the different adblocking possibilities, I hope others will chime in because there are several options for this.

_________________
Routers:Netgear R7800, R6400v1, R6400v2, Linksys EA8500, EA6900 (XvortexCFE), E2000 (converted WRT320N), WRT54GS v1.
OpenVPN Policy Based Routing: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=321686
Install guide R6400v2:http://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
OpenVPN Server Setup:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=318795
Install guide R7800: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Wireguard Server setup guide:https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1183135
Wireguard Client setup guide:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324624
Wireguard Advanced setup guide:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324787
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
Julius2020
DD-WRT Novice


Joined: 31 Oct 2020
Posts: 9

PostPosted: Sat Oct 31, 2020 16:52    Post subject: Reply with quote
I already have different local ips for the two routers. One is http://192.168.0.1/ and the other is http://192.168.1.1/

I tried to follow the wiki on "Ad Blocking with builds other than Micro" and it seems I'm unable to enable Local DNS in Services tab as the tutorial says, because I don't see any "Local DNS" in the Services tab.
maybe the interface of my build is different?
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 6938
Location: Netherlands

PostPosted: Sat Oct 31, 2020 17:00    Post subject: Reply with quote
That setting is removed because it is supposed to be always on (but you might need to set a value in LAN Domain on the Serves/Services tab under DHCP server)
_________________
Routers:Netgear R7800, R6400v1, R6400v2, Linksys EA8500, EA6900 (XvortexCFE), E2000 (converted WRT320N), WRT54GS v1.
OpenVPN Policy Based Routing: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=321686
Install guide R6400v2:http://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
OpenVPN Server Setup:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=318795
Install guide R7800: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Wireguard Server setup guide:https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1183135
Wireguard Client setup guide:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324624
Wireguard Advanced setup guide:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324787
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
Julius2020
DD-WRT Novice


Joined: 31 Oct 2020
Posts: 9

PostPosted: Sat Oct 31, 2020 17:07    Post subject: Reply with quote
What value would you recommend for LAN Domain ?
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 6938
Location: Netherlands

PostPosted: Sat Oct 31, 2020 17:12    Post subject: Reply with quote
home
_________________
Routers:Netgear R7800, R6400v1, R6400v2, Linksys EA8500, EA6900 (XvortexCFE), E2000 (converted WRT320N), WRT54GS v1.
OpenVPN Policy Based Routing: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=321686
Install guide R6400v2:http://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
OpenVPN Server Setup:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=318795
Install guide R7800: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Wireguard Server setup guide:https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1183135
Wireguard Client setup guide:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324624
Wireguard Advanced setup guide:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324787
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
Julius2020
DD-WRT Novice


Joined: 31 Oct 2020
Posts: 9

PostPosted: Sat Oct 31, 2020 17:30    Post subject: Reply with quote
home? that would be 192.168.1.1 in my case

so i added 192.168.1.1 for LAN Domain and run a test and is still not blocking ads..
itwontbewe
DD-WRT User


Joined: 29 Sep 2020
Posts: 103

PostPosted: Sat Oct 31, 2020 17:47    Post subject: Reply with quote
blocking youtube ads at the router level is tricky. connecting a laptop to a tv with hdmi and playing the videos in firefox with the ublock origin extension works. not sure if that helps your situation though
cursemex
DD-WRT Novice


Joined: 15 Dec 2014
Posts: 46

PostPosted: Sat Oct 31, 2020 18:02    Post subject: Reply with quote
Here are some Ad-block solutions for you:

Yamaraj's Adblock:-
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=307533&start=0

Wiki's guide:
https://wiki.dd-wrt.com/wiki/index.php/Ad_blocking

Unbound DNS over TLS w/Adblock:
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320362&start=0&sid=ab9dcab29de135aa13495ba3c3ed9607

However as it is been said it's tricky to block youtube ads on router level. I'm using Yamaraj's Ad-block script. I can see it working on my phone with ads on websites and in apps removed, but not on youtube. I haven't tried other methods, so I'd be interested in seeing if any other method works in blocking youtube ads on router level.
Julius2020
DD-WRT Novice


Joined: 31 Oct 2020
Posts: 9

PostPosted: Sat Oct 31, 2020 19:53    Post subject: Reply with quote
Well, I tried following this tutorial based on the wiki
https://www.youtube.com/watch?v=tzJPZYORHZ8

It does not work at all. Not on youtube, not on other websites.
Julius2020
DD-WRT Novice


Joined: 31 Oct 2020
Posts: 9

PostPosted: Sat Oct 31, 2020 20:11    Post subject: Reply with quote
I also added the firewall option on top of the first script, as described in the wiki. Still unsuccessful.
HalfBit
DD-WRT Guru


Joined: 04 Sep 2009
Posts: 766
Location: AR, USA

PostPosted: Sat Oct 31, 2020 20:14    Post subject: Reply with quote
I'm pretty sure the answer to this is going to be that you can't block youtube ads unless you're performing man in the middle (MITM) functions like SSL/TLS decryption.

Anything that is network based (router or DNS firewall blocking) is going to either 1. block the domain (all or nothing), or 2. not going to have visibility into the traffic to block only the ads unless layer 7 blocking is enabled by some sort of decryption (MITM) function/process.

As far as I understand, the ads and videos share the same hostname/FQDN/endpoint, and the URI (the part after the '/' in https://www.youtube.com/blah*) is different.

_________________
R7000 Nighthawk - DD-WRT v3.0-r40270M kongac (07/11/19)
R7000 Nighthawk - DD-WRT v3.0-r40270M kongac (07/11/19)
~~~~~~~~~~Dismantled for learning opportunities~~~~~~~~~~
WRT54Gv2
WRT54Gv8.2
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware 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