1
00:00:00,320 --> 00:00:06,319
okay look i know what you're gonna say Linus

2
00:00:03,840 --> 00:00:11,120
why are you showing me how to block ads that's how you make money

3
00:00:08,800 --> 00:00:16,640
and you would be right youtube's adsense is a big portion of

4
00:00:14,240 --> 00:00:21,199
our revenue here at Linus media group guys if you like this video and you do

5
00:00:18,720 --> 00:00:24,480
deploy the solution please buy a shirt or a hoodie

6
00:00:22,359 --> 00:00:27,359
lttstore.com all right but

7
00:00:25,519 --> 00:00:31,119
we also understand that many of the people who would be determined enough to

8
00:00:29,199 --> 00:00:36,000
set up something like this probably already have some form of ad

9
00:00:33,600 --> 00:00:38,640
blocker probably in their browser so

10
00:00:37,760 --> 00:00:45,600
kit today we're going to show you guys how to set up pi hole a dns based filtering

11
00:00:43,600 --> 00:00:51,280
tool that can be configured to block advertisements tracking and even known

12
00:00:48,879 --> 00:00:56,079
malicious sites and malware on your entire network with this

13
00:00:54,480 --> 00:01:02,960
wow that was a good throw you almost got me a computer so cheap

14
00:00:59,680 --> 00:01:05,600
that i am going to drop it right now

15
00:01:02,960 --> 00:01:05,600
like a mic

16
00:01:08,080 --> 00:01:13,840
speaking of the only one it's been a while since one of our

17
00:01:11,439 --> 00:01:18,240
videos has had just one sponsor like smart deploy with smart deploy you don't

18
00:01:16,080 --> 00:01:21,600
need any on-site it you can deploy images apps and scripts over local

19
00:01:19,920 --> 00:01:25,920
network or the cloud so go to smartdeploy.com Linus and claim your

20
00:01:24,000 --> 00:01:33,719
free licenses worth over seven hundred dollars we'll have that linked below

21
00:01:36,720 --> 00:01:43,119
traditional ad blocking tools like you would find on the chrome store like

22
00:01:40,400 --> 00:01:47,119
adblock or ublocker work from within your web browser they analyze the

23
00:01:45,200 --> 00:01:52,000
incoming data sent to your pc when you load a website and they remove or

24
00:01:49,520 --> 00:01:56,000
replace any content that is recognized as an ad

25
00:01:53,439 --> 00:01:59,360
now this works great for that one browser or maybe even that whole

26
00:01:58,320 --> 00:02:04,719
computer but what about ads on devices that don't

27
00:02:01,520 --> 00:02:07,680
have or allow ad blocking like the

28
00:02:04,719 --> 00:02:13,680
advertisements baked into mobile apps or on your smart tv or even on the google

29
00:02:10,720 --> 00:02:17,120
mobile discover page that is where pihole comes into play so

30
00:02:15,760 --> 00:02:21,599
here's an example you launch a mobile game on your phone

31
00:02:19,120 --> 00:02:25,760
and all the assets required by the game start loading you've got your your

32
00:02:23,120 --> 00:02:31,200
textures your dialogue your music etc well at that same time a request is

33
00:02:28,640 --> 00:02:37,440
being made to the url of the server which manages ads for that app

34
00:02:34,319 --> 00:02:40,000
your routers specified dns provider then

35
00:02:37,440 --> 00:02:44,879
looks up that url and replies to the phone with the ip address of that server

36
00:02:42,959 --> 00:02:48,959
so that it can load the ads now it's done this way rather than just

37
00:02:47,040 --> 00:02:54,400
baking the ads into the app download because among other reasons it allows

38
00:02:51,760 --> 00:02:58,800
advertisers to dynamically serve individually tailored ads even from

39
00:02:56,879 --> 00:03:03,360
multiple providers across multiple servers

40
00:03:00,239 --> 00:03:06,560
what a pie hole does is stand in between

41
00:03:03,360 --> 00:03:10,080
your dns provider and your device

42
00:03:06,560 --> 00:03:11,840
then if pihole has that requested url in

43
00:03:10,080 --> 00:03:15,760
its blacklist rather than forwarding the request along

44
00:03:13,760 --> 00:03:19,280
to your regular dns provider and subsequently connecting you and

45
00:03:17,360 --> 00:03:24,000
whatever's on the other side in this case an ad server

46
00:03:20,879 --> 00:03:26,480
instead piehole stops the request in its

47
00:03:24,000 --> 00:03:30,720
tracks and replies with an unspecified address essentially telling the device

48
00:03:29,440 --> 00:03:37,440
like your phone hey that ad server don't exist sorry

49
00:03:34,080 --> 00:03:39,519
so this is referred to as a dns sinkhole

50
00:03:37,440 --> 00:03:43,920
now at this point depending on how your app or your device's advertisement code

51
00:03:42,159 --> 00:03:49,360
handles errors you'll either be left with no add at all or an error so no ad

52
00:03:48,159 --> 00:03:54,560
or no ad another cool benefit is that once you've

53
00:03:52,400 --> 00:03:59,360
configured it this setup can be applied to practically anything like blocking

54
00:03:56,959 --> 00:04:03,840
known tracking services blacklisting adult sites from users on your network

55
00:04:01,439 --> 00:04:06,640
or even preventing malicious sites or malware from talking to their

56
00:04:05,120 --> 00:04:10,720
controlling server and that all sounds great

57
00:04:08,560 --> 00:04:13,760
but for the less network savvy among you it also probably sounds kind of

58
00:04:12,560 --> 00:04:17,840
complicated so how do you set it up

59
00:04:16,079 --> 00:04:22,479
believe it or not it is simpler than you might think piehole is designed to be

60
00:04:20,560 --> 00:04:27,280
highly compatible and it can work on almost any Linux system in a docker

61
00:04:24,720 --> 00:04:31,280
container or in a vm so long as you point your dns settings to it

62
00:04:29,280 --> 00:04:36,000
most people though deploy it on a cheap embedded computer like this five dollar

63
00:04:33,919 --> 00:04:39,759
raspberry pi zero though so to complete your setup you'll also

64
00:04:37,600 --> 00:04:45,360
need a couple more things a micro sd card a micro usb power supply and a

65
00:04:42,880 --> 00:04:48,479
micro b to Ethernet dongle we're assuming here that you already

66
00:04:46,800 --> 00:04:53,120
have some cardboard to house the pi a way to install the os 2 micro sd card

67
00:04:50,479 --> 00:04:57,120
and an Ethernet cable now even with this setup there are some command line

68
00:04:55,360 --> 00:05:03,360
moments that might be challenging for Linux novices but we've created a full

69
00:05:00,160 --> 00:05:05,280
step-by-step tutorial thanks Jake

70
00:05:03,360 --> 00:05:08,880
on the LTT forum which will be linked in the description below for the rest of

71
00:05:07,280 --> 00:05:12,479
the video we're going to assume you've got raspbian installed you've changed

72
00:05:10,639 --> 00:05:16,720
your default password you've configured a static ip for your pi and you're sshed

73
00:05:15,600 --> 00:05:21,440
into it our next step then is to navigate to the

74
00:05:18,800 --> 00:05:25,680
pi hole website and copy their one line install command run it and work our way

75
00:05:23,919 --> 00:05:30,720
to the networking section we select our default network adapter

76
00:05:27,600 --> 00:05:31,759
eth0 and then our desired upstream dns

77
00:05:30,720 --> 00:05:36,840
provider this is where the pi hole will forward a

78
00:05:34,160 --> 00:05:41,360
request if it's not in any of our blacklists on the subject of blacklist

79
00:05:38,960 --> 00:05:44,720
then the next screen is kinda where the magic happens

80
00:05:42,720 --> 00:05:49,039
it's blackmagic get it yeah it's terrible so here you'll find a

81
00:05:46,720 --> 00:05:53,039
handful of curated blacklists where you can select which one or multiple ones

82
00:05:51,520 --> 00:05:56,880
you'd like to use we're gonna stick with the default as it

83
00:05:54,639 --> 00:05:59,919
seems to work pretty well with minimal false positives depending on your

84
00:05:58,639 --> 00:06:05,919
browsing habits by the way another thing that we've included in the tutorial on the forum is

85
00:06:03,600 --> 00:06:09,039
a great tool for white listing common false positives

86
00:06:07,440 --> 00:06:14,960
next we're going to leave filtering on for both ipv4 and 6 and assuming the

87
00:06:12,800 --> 00:06:18,000
static ip that we specified earlier is the one that pi hole shows on the next

88
00:06:16,240 --> 00:06:21,360
screen we're going to say yes to that as well the rest of the settings like

89
00:06:19,919 --> 00:06:26,080
whether to install the admin panel the web server and the logging mode will be left at default and should for you as

90
00:06:24,720 --> 00:06:30,560
well unless you really know what you're doing now some processing will occur and

91
00:06:28,960 --> 00:06:36,240
bam you will be presented with the password and url for your pi hole admin

92
00:06:33,280 --> 00:06:40,800
panel logging in then reveals a vast array of pages with analytics a list

93
00:06:39,039 --> 00:06:45,840
showing you which devices are using pi hole or not manual white and black

94
00:06:43,360 --> 00:06:50,880
listing and configuration for your mass blacklists it's pretty freaking cool and

95
00:06:49,120 --> 00:06:56,560
really customizable now here's the thing though when you set it

96
00:06:53,360 --> 00:06:59,280
up this way pi hole will still only work

97
00:06:56,560 --> 00:07:04,400
on a device-by-device basis so you will need to manually change your dns

98
00:07:01,440 --> 00:07:08,479
settings on each one of the devices that might be on your network if you want to

99
00:07:06,400 --> 00:07:12,479
kick things up a notch and make it the default for your entire network and

100
00:07:10,560 --> 00:07:16,479
everything on it you will need to change the settings on your router

101
00:07:14,560 --> 00:07:20,160
now to avoid everyone getting mad we won't actually be changing anything on

102
00:07:18,080 --> 00:07:24,319
the office network so we're going to manually point a couple of devices at

103
00:07:21,840 --> 00:07:29,199
our pie hole like this iphone right here and the smart tv behind me both of which

104
00:07:27,440 --> 00:07:32,240
have ads uh so Jake i don't think this tv is

105
00:07:30,800 --> 00:07:36,479
actually going to let us change settings these are the expert settings

106
00:07:34,880 --> 00:07:42,560
this is like the network engineer you get to turn ipv6 on and off

107
00:07:39,199 --> 00:07:43,759
open network settings maybe that one

108
00:07:42,560 --> 00:07:47,759
nope this isn't looking great hey yeah try

109
00:07:46,479 --> 00:07:50,160
that yes

110
00:07:50,240 --> 00:07:56,240
should we we should do it before can we even find an ad on this tv i was looking

111
00:07:54,000 --> 00:08:00,160
earlier and i couldn't find one so oh so maybe they've cleaned up their act a

112
00:07:57,599 --> 00:08:04,319
little bit or yeah they are turned on you can toggle them on this tv but uh

113
00:08:03,280 --> 00:08:09,759
yeah we might just have to go to the internet browser maybe it waits and doesn't like spam you with ads right out

114
00:08:07,520 --> 00:08:13,440
of the box i mean

115
00:08:10,840 --> 00:08:16,319
youtube would probably serve as an ad the thing is

116
00:08:14,639 --> 00:08:20,800
youtube ad blocking with piholt isn't amazing because the url's changed so

117
00:08:18,080 --> 00:08:23,919
much oh interesting um it might work yeah there's an ad in this instance okay

118
00:08:22,960 --> 00:08:29,199
so let's give it a shot that is one thing with pie hole is the urls change on

119
00:08:27,680 --> 00:08:33,279
youtube ads so much and it's completely customizable by you so you would have to

120
00:08:31,520 --> 00:08:36,320
kind of keep track of those video ad urls

121
00:08:35,039 --> 00:08:41,200
and there's probably some repos that are pretty good for it but uh

122
00:08:38,159 --> 00:08:44,159
dope yeah so 77.

123
00:08:41,200 --> 00:08:47,519
oh god oh this is painful to enter i think you can talk to it

124
00:08:46,080 --> 00:08:49,760
yeah that's definitely going to be better

125
00:08:51,920 --> 00:08:58,560
okay you are connected to the internet blippity bloppity and close okay so i'll

126
00:08:56,320 --> 00:09:03,760
pull up the pie hole thing on our laptop here okay let's try another video here

127
00:09:01,680 --> 00:09:06,839
mine is tech tips pc build no dollar wasted pc build guide

128
00:09:06,839 --> 00:09:13,760
nothing 1000 gaming pc build guide

129
00:09:10,560 --> 00:09:15,600
nothing i'm surprised it's working

130
00:09:13,760 --> 00:09:18,560
uh youtube also doesn't serve an ad every time this is true so we might have

131
00:09:17,440 --> 00:09:22,560
to watch for a little while so i'm going to let this video play for a little while so that my viewer satisfaction

132
00:09:21,120 --> 00:09:27,120
seems pretty good actually well you can see if it blocks anything right uh yeah

133
00:09:25,120 --> 00:09:31,839
i just want to look at our user device list here okay so one of these it's

134
00:09:29,760 --> 00:09:37,600
definitely this one this is yeah well 15 queries so

135
00:09:35,120 --> 00:09:40,959
samsung ads blocked look at that whoa i can already see that

136
00:09:39,160 --> 00:09:45,360
ads.samsung.com blocks look at that that's sweet just like that hey

137
00:09:44,000 --> 00:09:48,880
okay well hold on let's see if it grabs let's see if it actually blocks anything

138
00:09:47,120 --> 00:09:53,839
from youtube i haven't gotten any youtube queries yet so

139
00:09:50,880 --> 00:09:58,480
let's try uh let's try a refresher yeah i don't know we haven't got any new

140
00:09:56,240 --> 00:10:02,080
is this an ad the click kind of looks like an ad is this just the video

141
00:10:00,720 --> 00:10:06,399
i don't think so click with the thing what even is this

142
00:10:04,399 --> 00:10:10,240
this is the video oh we kicked luca oh never mind that's just our video this is

143
00:10:08,080 --> 00:10:13,440
just a really weird video yeah all right so i mean

144
00:10:11,839 --> 00:10:17,519
success i guess okay so should we move on to

145
00:10:16,079 --> 00:10:22,160
actually here why don't we do a simple one let's do the pc okay

146
00:10:19,800 --> 00:10:25,920
speedtest.net they're the worst this came to mind as soon as i was looking

147
00:10:23,839 --> 00:10:30,160
for a site that has ads this thing has literally five ads on one page so if we

148
00:10:28,800 --> 00:10:34,240
go down here open network settings go to change

149
00:10:32,560 --> 00:10:38,320
adapter options so if we go to one we're going to do

150
00:10:36,120 --> 00:10:41,440
10.20.0.77 which is our pi hole and i'm not going to set an alternate dns server

151
00:10:40,000 --> 00:10:45,760
because we don't want to you know give it any chances to not use it yeah and

152
00:10:43,839 --> 00:10:51,360
then we close out here i might have to flush our dns but let's just try it

153
00:10:48,079 --> 00:10:51,360
blippity bloppity

154
00:10:52,320 --> 00:10:58,399
oh do we have ipv6 here i'll just turn ipv6 off yeah

155
00:10:56,640 --> 00:11:01,839
there we go all right you're on okay let's try that again

156
00:11:03,760 --> 00:11:09,440
okay wait a minute some of them are down yeah okay so sometimes

157
00:11:07,600 --> 00:11:13,920
ads will get through and then we can take this actual url add

158
00:11:12,519 --> 00:11:19,120
click.g.doubleclick.net let's try to remember that we go blacklist

159
00:11:16,640 --> 00:11:21,519
adding to the blacklist success okay so let's see

160
00:11:21,920 --> 00:11:28,240
wow they're determined they're determined buddies there i think what it is is it's just caching

161
00:11:26,560 --> 00:11:31,440
the dns i don't know how to do this on edge like why is this so why are you

162
00:11:29,839 --> 00:11:35,440
using edge what are you even doing just use chrome all right just right click

163
00:11:33,360 --> 00:11:40,480
chrome open incognito tab okay so here we go there we go in chrome

164
00:11:37,760 --> 00:11:45,200
and it's not working you're done bud no more ads okay so clearly it was just

165
00:11:42,720 --> 00:11:51,040
edge dns caching but uh yeah no more ads on speedtest.net

166
00:11:47,839 --> 00:11:53,680
why don't we move on to the iphone

167
00:11:51,040 --> 00:11:56,320
so on here configuring our dns is again pretty straightforward we're just going

168
00:11:54,880 --> 00:12:00,440
to set it to manual we're going to add a server 10.20.0.77

169
00:12:01,440 --> 00:12:06,399
you need to delete all the other ones and oh dang it yeah i guess that's true

170
00:12:04,560 --> 00:12:09,680
there's so many but well no these were entered by us at some

171
00:12:08,079 --> 00:12:14,399
point these are all like oh yes we would enter so now um actually speed test is

172
00:12:13,040 --> 00:12:17,260
the one that we could check here as well it's an app right so i go ahead i click

173
00:12:16,480 --> 00:12:22,720
go blah blah blah we are doing a speed test

174
00:12:20,800 --> 00:12:27,440
that's actually kind of weak sauce yeah it's not that great look at that no ad

175
00:12:24,399 --> 00:12:30,880
no ad it's gone so in this case we ended

176
00:12:27,440 --> 00:12:32,800
up with the sort of the the blank spot

177
00:12:30,880 --> 00:12:36,399
as opposed to just the element not loading at all because clearly their app

178
00:12:34,880 --> 00:12:41,839
just has like a placeholder yeah

179
00:12:38,480 --> 00:12:43,680
uh oh we should try flappy bird

180
00:12:41,839 --> 00:12:47,760
it's on the bottom there oh i had uh i had actually loaded up a tweak town on

181
00:12:45,519 --> 00:12:51,200
safari this might cache but oh it doesn't look

182
00:12:49,839 --> 00:12:55,600
like it did nope wow they're gone bye dude try flappy

183
00:12:54,079 --> 00:13:00,320
bird because that has like the old school banner ad on the bottom all right

184
00:12:58,240 --> 00:13:04,320
go on it's not even there it's gone even within games

185
00:13:02,639 --> 00:13:06,880
this is pretty cool so one more thing is now that we've been

186
00:13:05,680 --> 00:13:11,839
tooling around with this stuff for a little while um i want to try again and

187
00:13:09,680 --> 00:13:17,440
see if we get a youtube ad so why don't we go with

188
00:13:13,600 --> 00:13:20,000
smallest no compromises laptop

189
00:13:17,440 --> 00:13:23,600
and nothing this is working better than it was before actually you know what

190
00:13:21,839 --> 00:13:27,519
would actually be really cool guys if you liked this video um we should do

191
00:13:25,920 --> 00:13:32,399
that video you suggested a little while back so one of the big problems with not

192
00:13:30,320 --> 00:13:38,240
necessarily youtube on your smart tv but netflix is that they have blocked most

193
00:13:35,200 --> 00:13:40,639
of the major vpn providers so

194
00:13:38,240 --> 00:13:46,079
what they can't block is an individual setting up a us-based yeah a diy vpn

195
00:13:44,720 --> 00:13:50,639
in the us let's do it that they can reroute all their traffic through so i want to do that for like two years okay

196
00:13:48,800 --> 00:13:54,160
so guys make sure you're subscribed we are going to do that video find diy

197
00:13:52,240 --> 00:13:59,120
there you go but other than that i think that's about

198
00:13:56,160 --> 00:14:03,040
it so pie hole super cool tool like aside from ad blocking let's say there's

199
00:14:00,800 --> 00:14:07,600
a site or a domain or a pop-up that looks super spooky or maybe you don't

200
00:14:05,120 --> 00:14:12,000
want your kids seeing or you don't want your employees wasting time with or

201
00:14:09,839 --> 00:14:17,600
whatever the case may be all you do is take a domain plunk it into pie hole and

202
00:14:15,360 --> 00:14:22,160
it's gone across the entire network that is unless your users are savvy enough to

203
00:14:19,680 --> 00:14:26,240
configure their own dns uh on their device in which case you're pretty much

204
00:14:24,560 --> 00:14:31,120
hooped so i think we're gonna change our steam cache to a steam blocker

205
00:14:28,800 --> 00:14:35,199
this total game changer what we don't want to play video games at work you

206
00:14:32,480 --> 00:14:39,360
know so anyway i'm blown away by how much we can do with this computer it's

207
00:14:38,079 --> 00:14:46,880
not that one exactly that's fine it doesn't matter this computer that costs less than your

208
00:14:43,920 --> 00:14:50,399
non-fat half-sugar mocha latte frap or whatever that you got this morning i

209
00:14:48,560 --> 00:14:54,000
guess it shouldn't surprise me that much given how well this thing actually ran a

210
00:14:52,079 --> 00:14:58,399
surveillance server a while back so if you guys are looking for something to watch now you should definitely check

211
00:14:56,399 --> 00:15:02,199
that out that's over here speaking of things you should check out

212
00:15:00,160 --> 00:15:07,120
our sponsor for today's video privacy.com privacy.com is a free easy

213
00:15:05,279 --> 00:15:11,120
to use service that hides your credit card number it works by creating a

214
00:15:09,279 --> 00:15:15,760
virtual card number that is locked to whichever merchant you are shopping at

215
00:15:12,959 --> 00:15:20,320
so even if that merchant gets hacked the bad guys won't be able to just use your

216
00:15:18,160 --> 00:15:23,680
card anywhere they please and if they try you'll actually get a push

217
00:15:21,920 --> 00:15:27,440
notification so that you're always in the loop and you can cancel the card

218
00:15:25,279 --> 00:15:30,959
immediately cards are super simple to set up you just need to create an

219
00:15:28,959 --> 00:15:35,680
account link your virtual cards to your checking account or debit card add a

220
00:15:33,199 --> 00:15:38,959
limit and voila you're all set they've also got a browser extension that

221
00:15:37,199 --> 00:15:43,120
autofills information for you when you're making a purchase and privacy.com

222
00:15:41,120 --> 00:15:46,639
is pci dss compliant they use military-grade encryption to secure your

223
00:15:44,800 --> 00:15:51,360
information and they offer two-factor authentication and since they make money

224
00:15:48,880 --> 00:15:56,000
from merchants there is actually no cost to you so go sign up today you will get

225
00:15:53,759 --> 00:16:00,560
five bucks for free at privacy.com forward slash Linus that's privacy.com

226
00:15:58,720 --> 00:16:04,480
forward slash Linus so thanks for watching guys see ya
