A brief guide on how to set up Pi-Hole and make all clients on the network use it as DNS without any manual configuration on clients.
R15 is also known as
EAGLE PRO AI AX1500 Smart Router
https://eu.dlink.com/no/nb/products/r15-eagle-pro-ai-ax1500-smart-router
There are so many alternatives here, but in my case I just set up a Docker container on a Raspberry Pi 4.
See https://pi-hole.net/ on how to install.
In Settings -> DNS
make sure you have both IP4 and IPv6 upstream DNS servers enabled.
To configure the router you need to obtain both the IPv4 and IPv6 address of the device running Pi-Hole.
You can do this by going into Tools -> Generate Debug Log
and then from the log search for Network interfaces and addresses
and locate the eth0
(if running on LAN) interface, i.e.:
2: eth0: ...
...
inet 192.168.0.108/24 brd 192.168.0.255 scope global dynamic noprefixroute eth0
...
inet6 2001:4645:6e25:c:c11b:b7d:f195:82c8/64 scope global dynamic mngtmpaddr noprefixroute
...
My IPv4 address is 192.168.0.108
and IPv6 is 2001:4645:6e25:c:c11b:b7d:f195:82c8
Log into your router, i.e.: http://192.168.0.1
This involves a lot of waiting between steps, but minimal downtime.
First ensure that the IP address for your Pi-Hole device is reserved to ensure to ensure you don't have to re-do anything if your router for some reason clears DHCP information.
There is no way to do this for IPv6, so I have no idea of they will stay static. But it whould be based on the MAC address, which only changes if you use the
MAC Address Clone
feature underSettings -> Internet
.
- Under
Home
Click onConnected Clients
- Click the pencil icon on the card containing the IP of your Pi-Hole
- Enable
Reserve IP
- Enter the IPv4 address of your Pi-Hole into
IP Address (Reserved)
- Save and wait
Having "DNS Relay" enabled will force all DNS requests to go through the router and not the machine running Pi-Hole.
- Go to
Settings -> Network
in the panel menu - Under
Network Settings
disableEnable DNS Relay
- Save and wait
First for IPv4:
- Go to
Settings -> Internet
in the panel menu - Click
Advanced Settings...
- Put your Pi-Hole IPv4 address into
Primary DNS Server
- Leave
Secondary DNS Server
blank - Make Sure
Secure DNS
is disabled - Save and wait
Then for IPv6:
- Go back to the same panel menu item
- Now select the
IPv6
tab - Under
DNS Type
selectUse the following DNS addresses
- Put your Pi-Hole IPv6 address into
Primary DNS Server
- Leave
Secondary DNS server
blank - Save and wait
This should be immediately visible as the Pi-Hole dashboard starts to fill up with requests from all your devices.
Note that already connected devices might not have gotten a fresh DHCP lease eveh though changes were saved, so you might have to disconnect and reconnect connections physically.
You can confirm the settings via Network settings/details in your operating system. DNS should only show the IP adresses you configured in the router.