Reading your reply - which I appreciate - I think that maybe I wasn't clear. I'm not sure I have wrong assumptions, but let me try again. I want to respond to many parts of your reply but let me try to be concise about the setup and the problem.
My Setup
My Rpi base OS is Ubuntu 20.04
It was initially setup on my network with a DHCP address.
During the execution of the install script
curl -sSL https://install.pi-hole.net | bash
I configured custom DNS servers.
Observations
Once the install script was done - my /etc/dhcpcd.conf
had been modified to be a static address.
Attempts to use the sudo
command - resulted in a non-fatal error. Visiting the web ui also generated non-fatal errors in the logs.
myhost : Jul 4 08:14:10 : www-data : unable to resolve host myhost
myhost : Jul 4 08:14:10 : www-data : problem with defaults entries ; TTY=unknown ; PWD=/var/www/html/admin ; USER=root ;
Investigation
The modification of /etc/dhcpcd.conf
is done by this part of the script
pi-hole/automated install/basic-install.sh at 4736e03108763cc2d5659f48d8a1e8a64d9b2608 · pi-hole/pi-hole · GitHub
Here is the section of the script
# we can append these lines to dhcpcd.conf to enable a static IP
echo "interface ${PIHOLE_INTERFACE}
static ip_address=${IPV4_ADDRESS}
static routers=${IPv4gw}
static domain_name_servers=${PIHOLE_DNS_1} ${PIHOLE_DNS_2}" | tee -a /etc/dhcpcd.conf >/dev/null
# Then use the ip command to immediately set the new address
ip addr replace dev "${PIHOLE_INTERFACE}" "${IPV4_ADDRESS}"
# Also give a warning that the user may need to reboot their system
printf " %b Set IP address to %s\\n" "${TICK}" "${IPV4_ADDRESS%/*}"
printf " %b You may need to restart after the install is complete\\n" "${INFO}"
Conclusion
Clearly - the static configuration provided is changing the DNS of the pi-hole from what the DHCP server provided, to the DNS servers that I specified as my custom upstream servers for the pi-hole.
Thus - any local lookups on the pi-hole OS are going to fail - because the DNS does not point at any server that is aware of my local names (like my main router that perform DHCP).
Note - yes, I know how to fix this - but I'm trying to understand if this is a bug in the install script - or something else that I've done wrong. If it is a bug, I can imaging many people hitting this.
Hopefully this is better - you're absolutely right, my initial write up was confusing with extra details.