In case your Pihole receives some, or all of it’s configuration from a DHCP server, it may inherit a setting called search domain
. The search domain is intended to ease up local queries in your local subnet.
However, it may cause Pihole to add the search domain to queries.
For example:
www.example.org
becomes www.example.org.fritz.box
Too fix this on Ubuntu 22.04 LTS and Ubuntu server 22.04 LTS for example, go to the directory /etc
using a terminal. List the properties of the resolv.conf file using ls -halt | grep resolv.conf
You’ll see that the file is a symlink:
lrwxrwxrwx 1 root root 39 Mai 24 2023 resolv.conf
Use the mv command to change the file name:
mv resolv.conf resolv.conf.bak
List the properties of the resolv.conf file using: ls -halt | grep resolv.conf
lrwxrwxrwx 1 root root 39 Mai 24 2023 resolv.conf.bak -> ../run/systemd/resolve/stub-resolv.conf
Create a new file, for example using nano:
nano -l resolv.conf
Enter the address of your DNS server of choice into the new file. The server will be used by system applications.
nameserver fd00::2
Now you should restart the system, or restart the corresponding unit with one of these:
systemctl restart systemd-resolved.service
init 6
reboot