Skip to content

Commit 1512500

Browse files
authored
Update README.md (#651)
Fixed markdown formatting so it's easier to read in the browser.
1 parent 3f33bd7 commit 1512500

File tree

1 file changed

+53
-38
lines changed

1 file changed

+53
-38
lines changed

run-pihole/README.md

Lines changed: 53 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
Note: IP and VLAN settings for you pihole network, 20-dns-conflist and 10-dns.sh MUST all match each other.
1515

1616
- Example settings for pihole network:
17+
```
1718
Network Name: Pihole
1819
Host address: 10.0.5.1
1920
Netmask: 24
@@ -22,84 +23,97 @@ Note: IP and VLAN settings for you pihole network, 20-dns-conflist and 10-dns.sh
2223
Multicast DNS: Enable
2324
DHCP: None
2425
Ipv6 Interface Type: None
26+
```
2527

2628
- YOU WILL NEED TO CHANGE [`20-dns.conflist`](../cni-plugins/20-dns.conflist)
2729
Change the line:
30+
```
2831
"mac": "add 3 fake hex portions, replacing x's here 00:1c:b4:xx:xx:xx",
32+
```
2933
to create a legitimate mac address that matches some vendor space(first 6 digits ). It needs to be unique on your network.
3034
The example gives one option. Locally administered mac addresses do not work.
3135

3236
If you are using a different IP address than the example:
3337
Change these lines to match your settings:
38+
```
3439
"address": "10.0.5.3/24",
3540
"gateway": "10.0.5.1"
36-
If you are using a different VLAN than the example:
37-
Change this line to match your VLAN number:
41+
```
42+
If you are using a different VLAN than the example, change this line to match your VLAN number:
43+
```
3844
"master": "br5",
45+
```
3946

4047
- You MAY need to change[`10-dns.sh`](../dns-common/on_boot.d/10-dns.sh).
41-
If you are using a different IP address than the example:
42-
Change these lines to match your settings:
48+
If you are using a different IP address than the example, change these lines to match your settings:
49+
```
4350
IPV4_IP="10.0.5.3"
4451
IPV4_GW="10.0.5.1/24"
45-
If you are using a different VLAN than the example:
46-
Change this line to match your VLAN number:
52+
```
53+
If you are using a different VLAN than the example, change this line to match your VLAN number:
54+
```
4755
VLAN=5
48-
If you want the pihole container to have a different name than the example:
49-
Change this line to match the different name:
56+
```
57+
If you want the pihole container to have a different name than the example, change this line to match the different name:
58+
```
5059
CONTAINER=pihole
51-
- If you want IPv6 support
52-
Use 20-dnsipv6.conflist and update 10-dns.sh with the IPv6 addresses.
53-
Also, please provide IPv6 servers to podman using --dns arguments.
60+
```
61+
- If you want IPv6 support, use `20-dnsipv6.conflist` and update `10-dns.sh` with the IPv6 addresses.
62+
Also, please provide IPv6 servers to podman using `--dns` arguments.
5463

5564
## Steps
5665

5766
### Configuration files and scripts
5867

59-
1.0 Copy [`05-install-cni-plugins.sh`](../cni-plugins/05-install-cni-plugins.sh) to `/data/on_boot.d`
60-
1.1 Execute `chmod +x /data/on_boot.d/05-install-cni-plugins.sh`
61-
1.2 Execute `/data/on_boot.d/05-install-cni-plugins.sh`
68+
1. Set up `05-install-cni-plugins.sh`
69+
1. Copy [`05-install-cni-plugins.sh`](../cni-plugins/05-install-cni-plugins.sh) to `/data/on_boot.d`
70+
2. Execute `chmod +x /data/on_boot.d/05-install-cni-plugins.sh`
71+
3. Execute `/data/on_boot.d/05-install-cni-plugins.sh`
6272

63-
2.0 On your controller, create a network with no DHCP server and give it a VLAN.(see example settings above).
64-
2.1 Copy YOUR modified [`20-dns.conflist`] to `/data/podman/cni`
65-
2.2 Execute `chmod +x /data/podman/cni/20-dns.conflist`
66-
2.3 Execute `cp /data/podman/cni/20-dns.conflist /etc/cni/net.d/dns.conflist`
73+
3. On your controller, create a network with no DHCP server and give it a VLAN.(see example settings above).
74+
1. Copy YOUR modified [`20-dns.conflist`] to `/data/podman/cni`
75+
2. Execute `chmod +x /data/podman/cni/20-dns.conflist`
76+
3. Execute `cp /data/podman/cni/20-dns.conflist /etc/cni/net.d/dns.conflist`
6777

6878
To check progress - run the command:
6979
```shell
7080
podman network inspect dns
7181
```
72-
You should see a copy of your 20-dns.conflist displayed.
82+
You should see a copy of your `20-dns.conflist` displayed.
7383

74-
3.0 Copy your [`10-dns.sh`] to `/data/on_boot.d`
75-
3.1 Execute `chmod +x /data/on_boot.d/10-dns.sh`
76-
3.2 Execute `/data/on_boot.d/10-dns.sh`
84+
3. Set up `10-dns.sh`
85+
1. Copy your [`10-dns.sh`] to `/data/on_boot.d`
86+
2. Execute `chmod +x /data/on_boot.d/10-dns.sh`
87+
3. Execute `/data/on_boot.d/10-dns.sh`
7788

7889
### Create directories for persistent Pi-hole configuration
7990

80-
4.0 Execute the following commands:
81-
82-
```sh
83-
mkdir -p /data/etc-pihole
84-
mkdir -p /data/pihole/etc-dnsmasq.d
85-
```
86-
87-
### Create the pihole container
91+
4. Execute the following commands:
92+
```sh
93+
mkdir -p /data/etc-pihole
94+
mkdir -p /data/pihole/etc-dnsmasq.d
95+
```
96+
97+
### Create the pihole container
8898

8999
Note:
90-
--name MUST match the name you set in 10-dns.sh
91-
-e FTLCONF_REPLY_ADDR4 MUST be in the range you set for your pihole network
92-
-e TZ MUST match the timezone for your controller
100+
* `--name` MUST match the name you set in `10-dns.sh`
101+
* `-e FTLCONF_REPLY_ADDR4` MUST be in the range you set for your pihole network
102+
* `-e TZ` MUST match the timezone for your controller
93103

94104
The example uses these upstream DNS servers The following command sets the upstream DNS servers to `1.1.1.1` ([Cloudflare DNS](https://1.1.1.1/)) and `8.8.8.8` ([Google DNS](https://developers.google.com/speed/public-dns/)).
95105
If you want to use different upstream DNS servers, change the following lines:
106+
```
96107
--dns=1.1.1.1 \
97108
--dns=8.8.8.8 \
109+
```
98110
99111
If you want to run a DHCP server as well you need to add the following lines:
112+
```
100113
--cap-add=NET_ADMIN
114+
```
101115
102-
5.0 Run the following (or your modified version) by copy / pasting the entire set.
116+
5. Run the following (or your modified version) by copy / pasting the entire set.
103117
104118
```sh
105119
podman run -d \
@@ -128,16 +142,17 @@ If you want to run a DHCP server as well you need to add the following lines:
128142
> ERRO[0022] unable to get systemd connection to start healthchecks: dial unix /run/systemd/private: connect: no such file or directory
129143
> ```
130144
131-
6.0 Set the pihole admin password
145+
6. Set the pihole admin password
132146
133147
```sh
134148
podman exec -it pihole pihole -a -p YOURNEWPASSHERE
135149
```
136150
137151
## Set the new DNS in your UDM
138152
139-
7.0 Update your DNS Servers to `10.0.5.3` (or your custom ip) for each of your Networks (UDM GUI | Networks | Advanced | DHCP Name Server)
140-
7.1 Access the pihole web interface like you would normally, e.g. http://10.0.5.3 if using the example
153+
7. Update DNS settings in UDM
154+
1. Update your DNS Servers to `10.0.5.3` (or your custom ip) for each of your Networks (UDM GUI | Networks | Advanced | DHCP Name Server)
155+
2. Access the pihole web interface like you would normally, e.g. http://10.0.5.3 if using the example
141156
142157
## Upgrading your PiHole container
143158
@@ -176,7 +191,7 @@ DNS-over-TLS provider.
176191
### PiHole with DoTe
177192
178193
Simply copy the `custom_pihole_dote.sh` script to `/data/scripts` and run it
179-
to forward all DNS traffic over TLS to Cloudflare 1.1.1.1 / 1.0.0.1. You can modify the
194+
to forward all DNS traffic over TLS to Cloudflare `1.1.1.1` / `1.0.0.1`. You can modify the
180195
script to forward to different services with ease and full configuration
181196
options including certificate pinning is available in the DoTe README here:
182197
https://github.com/chrisstaite/DoTe/

0 commit comments

Comments
 (0)