-
Notifications
You must be signed in to change notification settings - Fork 20
/
block_ads.html
134 lines (90 loc) · 7.08 KB
/
block_ads.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<!--
=============================
_ ______ ____ ______
/ | / / __ \/ __ \/ ____/
/ |/ / / / / / / / __/
/ /| / /_/ / /_/ / /___
/_/ |_/\____/_____/_____/
=============================
-->
<!DOCTYPE html>
<html>
<head>
<title>N O D E</title>
<meta name="google-site-verification" content="KAh0wcTC2Anz5ea6Kq26RuhsiUKx5FD3D4HZAJdfaf4" />
<link rel="shortcut icon" href="images/avatar.png">
<link rel="alternate" href="https://n-o-d-e.net/rss/rss.xml" type="application/rss+xml" title="N O D E"/>
<link href='https://fonts.googleapis.com/css?family=Share+Tech+Mono' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="css/style.css" media="screen">
</head>
<body>
<div id="page">
<div id="content">
<!--HEADER SECTION -->
<div id="header"><pre>
<a class="node" href="http://n-o-d-e.net">
×× ×× ××××× ×××××× ××××××
××× ×× ×× ×× ×× ×× ××
×× × ×× ×× ×× ×× ×× ×××××
×× ××× ×× ×× ×× ×× ××
×× ×× ××××× ×××××× ××××××</a>
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</pre>
</div>
<!--CONTENT -->
<div id="list">
<div class="title">
HOW TO BLOCK ADS, TRACKERS, AND MALWARE (OS X, LINUX)<br>
--
</div>
<div id="post">
<p>This guide will show you how to block various domains that are associated with advertising, tracking, malware and more - all locally on your system. This is perfect for apps that might have advertising or trackers, as well as being a complimentary defense for browsers too.</p>
<p>It's a list and script made by Steven Black, which consists of a bunch of regularly updated malware, and advertiser domain lists. There are also options for blocking domains associated to porn, social networking and gambling sites as well.</p>
<p>This guide is aimed at Linux and OS X users, but there are more instructions on the github page for Windows folks.</p>
<div class="videowrapper">
<iframe src="https://www.youtube.com/embed/gCXirLvEd7M?rel=0&showinfo=0" frameborder="0"></iframe>
</div>
<p class="description">
- <a href="https://www.youtube.com/watch?v=gCXirLvEd7M" target="_blank">Youtube link</a><br>
- <a href="https://keybase.pub/nodefiles/block_ads.mp4" target="_blank">Keybase mirror</a>
</p>
<p class="subtitle">HOW-TO GUIDE</p>
<p>Step 1. First we're going to back up our existing hosts file, just in case. Open up a terminal, and copy the file. You'll need admin privileges.</p>
<span class="code">sudo cp /etc/hosts /etc/hosts.old</span>
<p>Step 2. Now we can clone the github repo:</p>
<span class="code">git clone https://github.com/StevenBlack/hosts</span>
<p>Step 3. CD into the newly created hosts directory</p>
<span class="code">cd hosts</span>
<p>Step 4. Steven made a useful python script that automatically pulls various regularly updated domain sources, and compiles them into a single hosts file. Type the following. We'll go through what each part does</p>
<span class="code">python updateHostsFile.py -a -r -b -e social gambling</span>
<p>- The python part launches the python program. If you have python 3, you'll type python3, all one word, here instead.<br>
- We then choose the python script file<br>
- The a option automates the creation process, removing all user prompts<br>
- The r option replaces the active hosts file on your system<br>
- The b option makes a backup of a previous hosts file<br>
- The e option isn't necessary, but it allows you to add more domain categories to your list. By default, the main list includes all malware and advertising domains, but you can add more by using the keywords porn, social, or gambling</p>
<p>Step 5. Press enter and the script will pull domain lists from various sources, creating, and then implementing your new hosts file. You now will need to flush your DNS cache for this to work. The easiest way to do this is to reboot, or you could do it manually.</p>
<p>Step 6. Now when your browser, or any other apps on your system tries to connect to sites that are on this list, they are automatically blocked, and no connection will be made.</p>
<p class="subtitle">OPTIONS</p>
<p>There are a lot more options you can look through, like making whitelists, custom domain mappings, editing the source lists and more. The github page has a lot more information.</p>
<p class="subtitle">CONCLUSION</p>
<p>These lists are updated very regularly, so it could be worth making a script to run this periodically. It's worth staying vigilant incase any domain sources get tainted somehow, but that's why we made backups, and you can always revert if you need to. Other than that, this is a cool way to add another layer of privacy and security to your network connected systems.</p>
<p>Thanks for watching.</p>
<p>--<br>
BY NODE</p>
</div>
</div>
<!--FOOTER SECTION -->
<div id="footer">
<pre>------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</pre>
<div class="filter">
<a href="http://n-o-d-e.net">HOME</a>
<span class="footdogs"> × </span>
<a href="http://N-O-D-E.net/shop/">SHOP</a>
<span class="footdogs"> × </span>
<a target="_blank" href="http://patreon.com/N_O_D_E_">PATREON</a>
<span class="footdogs"> × </span>
<a target="_blank" href="https://github.com/N-O-D-E/N-O-D-E.net">GITHUB</a>
</div>
</div>
</body>
</html>