Kaynağa Gözat

Update pihole setup instructions

Bob Mottram 7 yıl önce
ebeveyn
işleme
fe107b6fe5
2 değiştirilmiş dosya ile 52 ekleme ve 38 silme
  1. 16
    9
      doc/EN/app_pihole.org
  2. 36
    29
      website/EN/app_pihole.html

+ 16
- 9
doc/EN/app_pihole.org Dosyayı Görüntüle

@@ -32,21 +32,28 @@ When that's done select *About this system* from the control panel and see the I
32 32
 
33 33
 * On each client system within your local network
34 34
 
35
-#+begin_src bash
36
-sudo chattr -i /etc/resolv.conf
37
-sudo nano /etc/resolv.conf
38
-#+end_src
39
-
40
-Comment out any existing entries with a # character and add:
35
+On Arch/Parabola:
41 36
 
42 37
 #+begin_src bash
43
-nameserver [IPv4 address from the About screen]
38
+sudo pacman -S openresolv
39
+STATIC_IP=[your server static IP]
40
+sudo sed -i "s|#name_servers=.*|name_servers=$STATIC_IP|g" /etc/resolvconf.conf
41
+sudo sed -i "s|name_servers=.*|name_servers=$STATIC_IP|g" /etc/resolvconf.conf
42
+sudo chattr -i /etc/resolv.conf
43
+sudo resolvconf -u
44 44
 #+end_src
45 45
 
46
-Normally /resolv.conf/ will be overwritten every time your reboot, but you can prevent this with:
46
+Or on a Debian based sustem:
47 47
 
48 48
 #+begin_src bash
49
-sudo chattr +i /etc/resolv.conf
49
+sudo apt-get install resolvconf
50
+STATIC_IP=[your server static IP]
51
+echo 'domain localdomain' > /tmp/resolvconf
52
+echo 'search localdomain' >> /tmp/resolvconf
53
+echo "nameserver $STATIC_IP" >> /tmp/resolvconf
54
+sudo mv /tmp/resolvconf /etc/resolvconf/resolv.conf.d/head
55
+sudo chattr -i /etc/resolv.conf
56
+sudo resolvconf -u
50 57
 #+end_src
51 58
 
52 59
 * On your internet router

+ 36
- 29
website/EN/app_pihole.html Dosyayı Görüntüle

@@ -3,7 +3,7 @@
3 3
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4 4
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
5 5
 <head>
6
-<!-- 2016-11-12 Sat 23:53 -->
6
+<!-- 2017-08-21 Mon 22:30 -->
7 7
 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
8 8
 <meta name="viewport" content="width=device-width, initial-scale=1" />
9 9
 <title></title>
@@ -71,6 +71,7 @@
71 71
   pre.src-fortran:before { content: 'Fortran'; }
72 72
   pre.src-gnuplot:before { content: 'gnuplot'; }
73 73
   pre.src-haskell:before { content: 'Haskell'; }
74
+  pre.src-hledger:before { content: 'hledger'; }
74 75
   pre.src-java:before { content: 'Java'; }
75 76
   pre.src-js:before { content: 'Javascript'; }
76 77
   pre.src-latex:before { content: 'LaTeX'; }
@@ -188,7 +189,7 @@
188 189
 @licstart  The following is the entire license notice for the
189 190
 JavaScript code in this tag.
190 191
 
191
-Copyright (C) 2012-2013 Free Software Foundation, Inc.
192
+Copyright (C) 2012-2017 Free Software Foundation, Inc.
192 193
 
193 194
 The JavaScript code in this tag is free software: you can
194 195
 redistribute it and/or modify it under the terms of the GNU
@@ -263,9 +264,9 @@ You can block ads for any devices connected to your local network by installing
263 264
 Also don't expect perfection. Though many ads may be blocked by this system some will still get through. It's a constant cat and mouse game between advertisers and blockers.
264 265
 </p>
265 266
 
266
-<div id="outline-container-org28ca84b" class="outline-2">
267
-<h2 id="org28ca84b">Set a static IP address</h2>
268
-<div class="outline-text-2" id="text-org28ca84b">
267
+<div id="outline-container-org274081b" class="outline-2">
268
+<h2 id="org274081b">Set a static IP address</h2>
269
+<div class="outline-text-2" id="text-org274081b">
269 270
 <p>
270 271
 Ensure that your system has a static local IP address (typically 192.168..) using the option on the control panel. You will also need to know the IP address of your internet router, which is usually <b>192.168.1.1</b> or <b>192.168.1.254</b>.
271 272
 </p>
@@ -276,38 +277,44 @@ When that's done select <b>About this system</b> from the control panel and see
276 277
 </div>
277 278
 </div>
278 279
 
279
-<div id="outline-container-org8d14e27" class="outline-2">
280
-<h2 id="org8d14e27">On each client system within your local network</h2>
281
-<div class="outline-text-2" id="text-org8d14e27">
282
-<div class="org-src-container">
283
-<pre class="src src-bash">sudo chattr -i /etc/resolv.conf
284
-sudo nano /etc/resolv.conf
285
-</pre>
286
-</div>
287
-
280
+<div id="outline-container-org64ddba0" class="outline-2">
281
+<h2 id="org64ddba0">On each client system within your local network</h2>
282
+<div class="outline-text-2" id="text-org64ddba0">
288 283
 <p>
289
-Comment out any existing entries with a # character and add:
284
+On Arch/Parabola:
290 285
 </p>
291 286
 
292 287
 <div class="org-src-container">
293
-<pre class="src src-bash">nameserver [IPv4 address from the About screen]
294
-</pre>
288
+<pre><code class="src src-bash">sudo pacman -S openresolv
289
+<span class="org-variable-name">STATIC_IP</span>=[your server static IP]
290
+sudo sed -i <span class="org-string">"s|#name_servers=.*|name_servers=$STATIC_IP|g"</span> /etc/resolvconf.conf
291
+sudo sed -i <span class="org-string">"s|name_servers=.*|name_servers=$STATIC_IP|g"</span> /etc/resolvconf.conf
292
+sudo chattr -i /etc/resolv.conf
293
+sudo resolvconf -u
294
+</code></pre>
295 295
 </div>
296 296
 
297 297
 <p>
298
-Normally <i>resolv.conf</i> will be overwritten every time your reboot, but you can prevent this with:
298
+Or on a Debian based sustem:
299 299
 </p>
300 300
 
301 301
 <div class="org-src-container">
302
-<pre class="src src-bash">sudo chattr +i /etc/resolv.conf
303
-</pre>
302
+<pre><code class="src src-bash">sudo apt-get install resolvconf
303
+<span class="org-variable-name">STATIC_IP</span>=[your server static IP]
304
+<span class="org-builtin">echo</span> <span class="org-string">'domain localdomain'</span> &gt; /tmp/resolvconf
305
+<span class="org-builtin">echo</span> <span class="org-string">'search localdomain'</span> &gt;&gt; /tmp/resolvconf
306
+<span class="org-builtin">echo</span> <span class="org-string">"nameserver $STATIC_IP"</span> &gt;&gt; /tmp/resolvconf
307
+sudo mv /tmp/resolvconf /etc/resolvconf/resolv.conf.d/head
308
+sudo chattr -i /etc/resolv.conf
309
+sudo resolvconf -u
310
+</code></pre>
304 311
 </div>
305 312
 </div>
306 313
 </div>
307 314
 
308
-<div id="outline-container-orgb95e44f" class="outline-2">
309
-<h2 id="orgb95e44f">On your internet router</h2>
310
-<div class="outline-text-2" id="text-orgb95e44f">
315
+<div id="outline-container-org7512e86" class="outline-2">
316
+<h2 id="org7512e86">On your internet router</h2>
317
+<div class="outline-text-2" id="text-org7512e86">
311 318
 <p>
312 319
 If you can access the settings on your local internet router then this is the simplest way to provide ad blocking for all devices which connect to it. Unfortunately some router models don't let you edit the DNS settings and if that's the case you might want to consider getting a different router.
313 320
 </p>
@@ -317,9 +324,9 @@ Edit the DNS settings and add the IPv4 address which you got from the control pa
317 324
 </p>
318 325
 </div>
319 326
 
320
-<div id="outline-container-orge5bdb7f" class="outline-3">
321
-<h3 id="orge5bdb7f">LibreCMC</h3>
322
-<div class="outline-text-3" id="text-orge5bdb7f">
327
+<div id="outline-container-orgb9b9a80" class="outline-3">
328
+<h3 id="orgb9b9a80">LibreCMC</h3>
329
+<div class="outline-text-3" id="text-orgb9b9a80">
323 330
 <p>
324 331
 On a router running LibreCMC from the <b>Network</b> menu select <b>DHCP and DNS</b>. Enter the static IP address of your Freedombone system within <b>DNS Forwardings</b>, then at the bottom of the page click on <b>Save &amp; Apply</b>. Any devices which connect to your router will now have ad blocking.
325 332
 </p>
@@ -327,9 +334,9 @@ On a router running LibreCMC from the <b>Network</b> menu select <b>DHCP and DNS
327 334
 </div>
328 335
 </div>
329 336
 
330
-<div id="outline-container-org71dabfb" class="outline-2">
331
-<h2 id="org71dabfb">Configuring block lists</h2>
332
-<div class="outline-text-2" id="text-org71dabfb">
337
+<div id="outline-container-org85d7c07" class="outline-2">
338
+<h2 id="org85d7c07">Configuring block lists</h2>
339
+<div class="outline-text-2" id="text-org85d7c07">
333 340
 <p>
334 341
 You can configure the block lists which the system uses by going to the <b>administrator control panel</b>, selecting <b>App Settings</b> then choosing <b>pihole</b>. You can also add any extra domain names to the whitelist if they're being wrongly blocked or to the blacklist if they're not blocked by the current lists.
335 342
 </p>