From fe107b6fe57c3e51a984f07aeb103e1d7161edcb Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 21 Aug 2017 22:32:11 +0100 Subject: [PATCH] Update pihole setup instructions --- doc/EN/app_pihole.org | 25 +++++++++------ website/EN/app_pihole.html | 65 +++++++++++++++++++++----------------- 2 files changed, 52 insertions(+), 38 deletions(-) diff --git a/doc/EN/app_pihole.org b/doc/EN/app_pihole.org index 24d79a09..4abf9111 100644 --- a/doc/EN/app_pihole.org +++ b/doc/EN/app_pihole.org @@ -32,21 +32,28 @@ When that's done select *About this system* from the control panel and see the I * On each client system within your local network +On Arch/Parabola: + #+begin_src bash +sudo pacman -S openresolv +STATIC_IP=[your server static IP] +sudo sed -i "s|#name_servers=.*|name_servers=$STATIC_IP|g" /etc/resolvconf.conf +sudo sed -i "s|name_servers=.*|name_servers=$STATIC_IP|g" /etc/resolvconf.conf sudo chattr -i /etc/resolv.conf -sudo nano /etc/resolv.conf +sudo resolvconf -u #+end_src -Comment out any existing entries with a # character and add: +Or on a Debian based sustem: #+begin_src bash -nameserver [IPv4 address from the About screen] -#+end_src - -Normally /resolv.conf/ will be overwritten every time your reboot, but you can prevent this with: - -#+begin_src bash -sudo chattr +i /etc/resolv.conf +sudo apt-get install resolvconf +STATIC_IP=[your server static IP] +echo 'domain localdomain' > /tmp/resolvconf +echo 'search localdomain' >> /tmp/resolvconf +echo "nameserver $STATIC_IP" >> /tmp/resolvconf +sudo mv /tmp/resolvconf /etc/resolvconf/resolv.conf.d/head +sudo chattr -i /etc/resolv.conf +sudo resolvconf -u #+end_src * On your internet router diff --git a/website/EN/app_pihole.html b/website/EN/app_pihole.html index 148c696e..9b3f1d3e 100644 --- a/website/EN/app_pihole.html +++ b/website/EN/app_pihole.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + @@ -71,6 +71,7 @@ pre.src-fortran:before { content: 'Fortran'; } pre.src-gnuplot:before { content: 'gnuplot'; } pre.src-haskell:before { content: 'Haskell'; } + pre.src-hledger:before { content: 'hledger'; } pre.src-java:before { content: 'Java'; } pre.src-js:before { content: 'Javascript'; } pre.src-latex:before { content: 'LaTeX'; } @@ -188,7 +189,7 @@ @licstart The following is the entire license notice for the JavaScript code in this tag. -Copyright (C) 2012-2013 Free Software Foundation, Inc. +Copyright (C) 2012-2017 Free Software Foundation, Inc. The JavaScript code in this tag is free software: you can 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 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.

-
-

Set a static IP address

-
+
+

Set a static IP address

+

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 192.168.1.1 or 192.168.1.254.

@@ -276,38 +277,44 @@ When that's done select About this system from the control panel and see
-
-

On each client system within your local network

-
-
-
sudo chattr -i /etc/resolv.conf
-sudo nano /etc/resolv.conf
-
-
- +
+

On each client system within your local network

+

-Comment out any existing entries with a # character and add: +On Arch/Parabola:

-
nameserver [IPv4 address from the About screen]
-
+
sudo pacman -S openresolv
+STATIC_IP=[your server static IP]
+sudo sed -i "s|#name_servers=.*|name_servers=$STATIC_IP|g" /etc/resolvconf.conf
+sudo sed -i "s|name_servers=.*|name_servers=$STATIC_IP|g" /etc/resolvconf.conf
+sudo chattr -i /etc/resolv.conf
+sudo resolvconf -u
+

-Normally resolv.conf will be overwritten every time your reboot, but you can prevent this with: +Or on a Debian based sustem:

-
sudo chattr +i /etc/resolv.conf
-
+
sudo apt-get install resolvconf
+STATIC_IP=[your server static IP]
+echo 'domain localdomain' > /tmp/resolvconf
+echo 'search localdomain' >> /tmp/resolvconf
+echo "nameserver $STATIC_IP" >> /tmp/resolvconf
+sudo mv /tmp/resolvconf /etc/resolvconf/resolv.conf.d/head
+sudo chattr -i /etc/resolv.conf
+sudo resolvconf -u
+
-
-

On your internet router

-
+
+

On your internet router

+

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.

@@ -317,9 +324,9 @@ Edit the DNS settings and add the IPv4 address which you got from the control pa

-
-

LibreCMC

-
+
+

LibreCMC

+

On a router running LibreCMC from the Network menu select DHCP and DNS. Enter the static IP address of your Freedombone system within DNS Forwardings, then at the bottom of the page click on Save & Apply. Any devices which connect to your router will now have ad blocking.

@@ -327,9 +334,9 @@ On a router running LibreCMC from the Network menu select DHCP and DNS
-
-

Configuring block lists

-
+
+

Configuring block lists

+

You can configure the block lists which the system uses by going to the administrator control panel, selecting App Settings then choosing pihole. 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.