I have a Raspberry Pi Zero W as Pi-Hole + unbound going.
Recently, I bound a new router and lost all my local DNS records.
So what I mean by that is due to proprietary formats and non-interoperability between the old and new router,
I would have been forced to re-enter all IP <-> local hostnames pairs by hand again in the new web-ui.
Fuck that, never again.
I'm thinking not entering the local hostnames in my router ever again (unless it's OpenWRT some day...).
Instead, I want to use a local /etc/hosts (or whatever...) on my PiHole + unbound installation (which itself is based on DietPi, so I have root access).
I would like to manage my local DNS addresses inside my home (192.168.x.x) locally on the piHole, but not inside of the "local DNS records" UI. I don't want to be bound by another vendor (PiHole).
I really, really want to use a manuall plain text file like /etc/hosts for that.
Just entered a sample entry into /etc/hosts and then I googled what to add to /etc/resolv.conf of the pihole itself:
Quote: |
domain home
search home
nameserver ::1
nameserver 127.0.0.1
options trust-ad
lookup file bind |
I assume the last line is "intended" to mean, lookup local /etc/hosts file first, if no match goto the "real" DNS servers in pure unbound fashion.
I tried it out (not locally on the pihole, on a client that has pihole/unbound as DNS server set):
nslookup dontouchdapeepee (doesn't work)
ping dontouchdapeepee (doesn't work)
Locally on the pihole/unbound it's not much different:
nslookup dontouchdapeepee (doesn't work)
ping dontouchdapeepee (this does work, but only locally)
Does somebody know about unbound and networking?
Help is appreciated.
EDIT: forget about it. I am a retard.
I only needed to restart pihole-FTL service before any changes to /etc/resolv.conf or /etc/hosts actually make a difference.
(I thought it was live / immediatelly)
Now it works exactly as I intended!
UPDATE:
Actually, since we're at it already I might add a new question:
One advantage of my old router was that the IP <-> local DNS name mapping was based on the MAC address.
If I additionally install a local DHCP server on my pihole ... how could I realize the IP <-> local DNS name by MAC address?
Cause that's the only "killer" feature I miss from the old router, really.
Everything else is just regular ... be a router, gib Wifi, gib Internet, and no more.
"There will be no end to the troubles of humanity, until philosophers become kings, or kings become philosophers.", Plato.
"Hyperbole will destroy us all.", Matt Dillahunty.
"The hyperbole, the demonization of the other opinion and the unwillingness to even read the opposing opinion destroys the so important political discussions necessary for the well functioning of society.", Couleur