You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/Containers/Pi-hole.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,15 +68,15 @@ It is important to realise that `WEBPASSWORD` only has any effect on the very **
68
68
69
69
If `WEBPASSWORD` is **not** set on first launch, Pi-hole defaults to a randomly-generated password which you can discover after the first launch like this:
70
70
71
-
```bash
71
+
```console
72
72
$ docker logs pihole | grep random
73
73
```
74
74
75
75
> Remember, docker logs are ephemeral so you need to run that command before the log disappears!
76
76
77
77
If you ever need to reset Pi-hole's admin password to a known value, use the following command:
78
78
79
-
```bash
79
+
```console
80
80
$ docker exec pihole pihole -a -p mybigsecret
81
81
```
82
82
@@ -206,7 +206,7 @@ Keep in mind that many Raspberry Pis have both Ethernet and WiFi interfaces. It
206
206
207
207
You can use the following command to discover the MAC addresses for your Raspberry Pi's Ethernet and WiFi interfaces:
208
208
209
-
```bash
209
+
```console
210
210
$ for I in eth0 wlan0 ; do ip link show $I ; done
211
211
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
@@ -227,7 +227,7 @@ The Raspberry Pi itself does **not** have to use the Pi-hole container for its o
227
227
228
228
Nevertheless, if you configure Pi-hole to be [authoritative for local domain names](#localNames) (eg `raspberrypi.home.arpa`) then you will probably want to configure your Raspberry Pi to use the Pi-hole container in the first instance, and then fall back to an alternative if the container is down. Here is an example of how to do that:
229
229
230
-
```bash
230
+
```console
231
231
$ echo "name_servers=127.0.0.1" | sudo tee -a /etc/resolvconf.conf
232
232
$ echo "name_servers_append=8.8.8.8" | sudo tee -a /etc/resolvconf.conf
233
233
$ echo "resolv_conf_local_only=NO" | sudo tee -a /etc/resolvconf.conf
@@ -250,7 +250,7 @@ In words:
250
250
251
251
You need slightly different syntax if you want to add multiple fallback servers. For example, suppose your fallback hosts are a local server (eg 192.168.1.2) running BIND9 and 8.8.8.8. The command would be:
252
252
253
-
```bash
253
+
```console
254
254
$ echo 'name_servers_append="192.168.1.2 8.8.8.8"' | sudo tee -a /etc/resolvconf.conf
255
255
```
256
256
@@ -274,7 +274,7 @@ Make these assumptions:
274
274
275
275
The result of the configuration appears in `/etc/resolv.conf`:
276
276
277
-
```bash
277
+
```console
278
278
$ cat /etc/resolv.conf
279
279
# Generated by resolvconf
280
280
nameserver 127.0.0.1
@@ -294,15 +294,15 @@ Notes:
294
294
295
295
* If you wish to prevent the Raspberry Pi from including the address(es) of DNS servers learned from DHCP, you can instruct the DHCP client running on the Raspberry Pi to ignore the information coming from the DHCP server:
296
296
297
-
```bash
297
+
```console
298
298
$ echo 'nooption domain_name_servers' | sudo tee -a /etc/dhcpcd.conf
299
299
$ sudo service dhcpcd reload
300
300
$ sudo resolvconf -u
301
301
```
302
302
303
303
* If you have followed the steps in [Adding local domain names](#localNames) to define names for your local hosts, you can inform the Raspberry Pi of that fact like this:
304
304
305
-
```bash
305
+
```console
306
306
$ echo 'search_domains=home.arpa' | sudo tee -a /etc/resolvconf.conf
307
307
$ sudo resolvconf -u
308
308
```
@@ -346,21 +346,21 @@ If you need help, try asking questions on the [IOTstack Discord channel](https:/
346
346
347
347
Install dig:
348
348
349
-
```bash
349
+
```console
350
350
$ apt install dnsutils
351
351
```
352
352
353
353
Test that Pi-hole is correctly configured (should respond 192.168.1.10):
354
354
355
-
```bash
355
+
```console
356
356
$ dig raspberrypi.home.arpa @192.168.1.10
357
357
```
358
358
359
359
To test on your desktop if your network configuration is correct, and an ESP
360
360
will resolve its DNS queries correctly, restart your desktop machine to ensure
0 commit comments