-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path1-DNS_CNAME_redirects.txt
226 lines (219 loc) · 7.46 KB
/
1-DNS_CNAME_redirects.txt
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
#If blocking youtube.com or google.com isn't an option, but you would rather filter the websites instead,
#you will need to alter your raspberry pi hosts file, and add a couple CNAME records.
#First off, access the hosts file in the /etc/ directory on your raspberry pi. No, I'm not telling you how, you should know already.
#This is the full file and directory /etc/hosts
#Inside the hosts file add the below entries. I have added my own notes to indicate what they are because I have other entries in the file as well
******************host file sample******************
# Redirect to Google SafeSearch, the wild card* wasn't always working for catching country domain codes, so I added them manually
216.239.38.120 WWW.google.com
216.239.38.120 www.google.*
216.239.38.120 WWW.google.ad
216.239.38.120 WWW.google.ae
216.239.38.120 WWW.google.com.af
216.239.38.120 WWW.google.com.ag
216.239.38.120 WWW.google.com.ai
216.239.38.120 WWW.google.al
216.239.38.120 WWW.google.am
216.239.38.120 WWW.google.co.ao
216.239.38.120 WWW.google.com.ar
216.239.38.120 WWW.google.as
216.239.38.120 WWW.google.at
216.239.38.120 WWW.google.com.au
216.239.38.120 WWW.google.az
216.239.38.120 WWW.google.ba
216.239.38.120 WWW.google.com.bd
216.239.38.120 WWW.google.be
216.239.38.120 WWW.google.bf
216.239.38.120 WWW.google.bg
216.239.38.120 WWW.google.com.bh
216.239.38.120 WWW.google.bi
216.239.38.120 WWW.google.bj
216.239.38.120 WWW.google.com.bn
216.239.38.120 WWW.google.com.bo
216.239.38.120 WWW.google.com.br
216.239.38.120 WWW.google.bs
216.239.38.120 WWW.google.bt
216.239.38.120 WWW.google.co.bw
216.239.38.120 WWW.google.by
216.239.38.120 WWW.google.com.bz
216.239.38.120 WWW.google.ca
216.239.38.120 WWW.google.cd
216.239.38.120 WWW.google.cf
216.239.38.120 WWW.google.cg
216.239.38.120 WWW.google.ch
216.239.38.120 WWW.google.ci
216.239.38.120 WWW.google.co.ck
216.239.38.120 WWW.google.cl
216.239.38.120 WWW.google.cm
216.239.38.120 WWW.google.cn
216.239.38.120 WWW.google.com.co
216.239.38.120 WWW.google.co.cr
216.239.38.120 WWW.google.com.cu
216.239.38.120 WWW.google.cv
216.239.38.120 WWW.google.com.cy
216.239.38.120 WWW.google.cz
216.239.38.120 WWW.google.de
216.239.38.120 WWW.google.dj
216.239.38.120 WWW.google.dk
216.239.38.120 WWW.google.dm
216.239.38.120 WWW.google.com.do
216.239.38.120 WWW.google.dz
216.239.38.120 WWW.google.com.ec
216.239.38.120 WWW.google.ee
216.239.38.120 WWW.google.com.eg
216.239.38.120 WWW.google.es
216.239.38.120 WWW.google.com.et
216.239.38.120 WWW.google.fi
216.239.38.120 WWW.google.com.fj
216.239.38.120 WWW.google.fm
216.239.38.120 WWW.google.fr
216.239.38.120 WWW.google.ga
216.239.38.120 WWW.google.ge
216.239.38.120 WWW.google.gg
216.239.38.120 WWW.google.com.gh
216.239.38.120 WWW.google.com.gi
216.239.38.120 WWW.google.gl
216.239.38.120 WWW.google.gm
216.239.38.120 WWW.google.gr
216.239.38.120 WWW.google.com.gt
216.239.38.120 WWW.google.gy
216.239.38.120 WWW.google.com.hk
216.239.38.120 WWW.google.hn
216.239.38.120 WWW.google.hr
216.239.38.120 WWW.google.ht
216.239.38.120 WWW.google.hu
216.239.38.120 WWW.google.co.id
216.239.38.120 WWW.google.ie
216.239.38.120 WWW.google.co.il
216.239.38.120 WWW.google.im
216.239.38.120 WWW.google.co.in
216.239.38.120 WWW.google.iq
216.239.38.120 WWW.google.is
216.239.38.120 WWW.google.it
216.239.38.120 WWW.google.je
216.239.38.120 WWW.google.com.jm
216.239.38.120 WWW.google.jo
216.239.38.120 WWW.google.co.jp
216.239.38.120 WWW.google.co.ke
216.239.38.120 WWW.google.com.kh
216.239.38.120 WWW.google.ki
216.239.38.120 WWW.google.kg
216.239.38.120 WWW.google.co.kr
216.239.38.120 WWW.google.com.kw
216.239.38.120 WWW.google.kz
216.239.38.120 WWW.google.la
216.239.38.120 WWW.google.com.lb
216.239.38.120 WWW.google.li
216.239.38.120 WWW.google.lk
216.239.38.120 WWW.google.co.ls
216.239.38.120 WWW.google.lt
216.239.38.120 WWW.google.lu
216.239.38.120 WWW.google.lv
216.239.38.120 WWW.google.com.ly
216.239.38.120 WWW.google.co.ma
216.239.38.120 WWW.google.md
216.239.38.120 WWW.google.me
216.239.38.120 WWW.google.mg
216.239.38.120 WWW.google.mk
216.239.38.120 WWW.google.ml
216.239.38.120 WWW.google.com.mm
216.239.38.120 WWW.google.mn
216.239.38.120 WWW.google.ms
216.239.38.120 WWW.google.com.mt
216.239.38.120 WWW.google.mu
216.239.38.120 WWW.google.mv
216.239.38.120 WWW.google.mw
216.239.38.120 WWW.google.com.mx
216.239.38.120 WWW.google.com.my
216.239.38.120 WWW.google.co.mz
216.239.38.120 WWW.google.com.na
216.239.38.120 WWW.google.com.ng
216.239.38.120 WWW.google.com.ni
216.239.38.120 WWW.google.ne
216.239.38.120 WWW.google.nl
216.239.38.120 WWW.google.no
216.239.38.120 WWW.google.com.np
216.239.38.120 WWW.google.nr
216.239.38.120 WWW.google.nu
216.239.38.120 WWW.google.co.nz
216.239.38.120 WWW.google.com.om
216.239.38.120 WWW.google.com.pa
216.239.38.120 WWW.google.com.pe
216.239.38.120 WWW.google.com.pg
216.239.38.120 WWW.google.com.ph
216.239.38.120 WWW.google.com.pk
216.239.38.120 WWW.google.pl
216.239.38.120 WWW.google.pn
216.239.38.120 WWW.google.com.pr
216.239.38.120 WWW.google.ps
216.239.38.120 WWW.google.pt
216.239.38.120 WWW.google.com.py
216.239.38.120 WWW.google.com.qa
216.239.38.120 WWW.google.ro
216.239.38.120 WWW.google.ru
216.239.38.120 WWW.google.rw
216.239.38.120 WWW.google.com.sa
216.239.38.120 WWW.google.com.sb
216.239.38.120 WWW.google.sc
216.239.38.120 WWW.google.se
216.239.38.120 WWW.google.com.sg
216.239.38.120 WWW.google.sh
216.239.38.120 WWW.google.si
216.239.38.120 WWW.google.sk
216.239.38.120 WWW.google.com.sl
216.239.38.120 WWW.google.sn
216.239.38.120 WWW.google.so
216.239.38.120 WWW.google.sm
216.239.38.120 WWW.google.sr
216.239.38.120 WWW.google.st
216.239.38.120 WWW.google.com.sv
216.239.38.120 WWW.google.td
216.239.38.120 WWW.google.tg
216.239.38.120 WWW.google.co.th
216.239.38.120 WWW.google.com.tj
216.239.38.120 WWW.google.tl
216.239.38.120 WWW.google.tm
216.239.38.120 WWW.google.tn
216.239.38.120 WWW.google.to
216.239.38.120 WWW.google.com.tr
216.239.38.120 WWW.google.tt
216.239.38.120 WWW.google.com.tw
216.239.38.120 WWW.google.co.tz
216.239.38.120 WWW.google.com.ua
216.239.38.120 WWW.google.co.ug
216.239.38.120 WWW.google.co.uk
216.239.38.120 WWW.google.com.uy
216.239.38.120 WWW.google.co.uz
216.239.38.120 WWW.google.com.vc
216.239.38.120 WWW.google.co.ve
216.239.38.120 WWW.google.vg
216.239.38.120 WWW.google.co.vi
216.239.38.120 WWW.google.com.vn
216.239.38.120 WWW.google.vu
216.239.38.120 WWW.google.ws
216.239.38.120 WWW.google.rs
216.239.38.120 WWW.google.co.za
216.239.38.120 WWW.google.co.zm
216.239.38.120 WWW.google.co.zw
216.239.38.120 WWW.google.cat
# Redirect to Bing SafeSearch
204.79.197.220 www.bing.com
# Entries to help pihole find filtered servers
# Don't forget to add the CNAME records
216.239.38.120 restrict.youtube.com
216.239.38.119 restrictmoderate.youtube.com
216.239.38.120 forcesafesearch.google.com
204.79.197.220 strict.bing.com
52.149.247.1 safe.duckduckgo.com
******************host file sample******************
#Forcing youtube-safesearch and duckduckgo-safesearch requires adding entries to your pihole admin interface, so browse there next
#example= https://pihole-IP/admin
#Then go to "Local DNS" and under it open up "CNAME Records"
#Here are my entries to force duckduckgo and youtube safe search, make sure each domain matches the target
Domain Target
duckduckgo.com safe.duckduckgo.com
m.youtube.com restrictmoderate.youtube.com
www.youtube-nocookie.com restrictmoderate.youtube.com
www.youtube.com restrictmoderate.youtube.com
youtube.googleapis.com restrictmoderate.youtube.com
youtubei.googleapis.com restrictmoderate.youtube.com