Usually you just need to update /etc/dhcp/dhclient.conf with the usual entries. (Do not forget to sudo if you're not root.)
Unfortunately some distributions change their common alias for ethernet from eth0 to a generated name, containing the MAC-address.
This makes the option "listening just to eth0" useless. Unfortunately I reconized this only after a reboot.
Suddenly i could nslookup from the pi itself, but not from outside.
So what do you need to do?
Either change the interface listening behaviour to "local" aka "all interfaces",
or you need to rename the interface name by adding the option "net.ifnames=0" to the file /boot/cmdline.txt
So here comes my request: Would it be possible to enter the specific name for the eth-interface?
Pi-hole's installer gets the interfaces through this method:
# Get available interfaces that are UP
get_available_interfaces() {
# There may be more than one so it's all stored in a variable
availableInterfaces=$(ip --oneline link show up | grep -v "lo" | awk '{print $2}' | cut -d':' -f1 | cut -d'@' -f1)
}
This works fine, but in the /etc/pihole/setupVars.conf there's still eth0 like in the web interface as well.
After changing it manually there everything seems to be fine. I guess the file isn't updated correctly within setup.