I have not entered my router as upstream server, nor have I entered the pi-hole in my router as a DNS server.
Actually I want to use it completely stand alone.
What did "resolve" (rather work around) the issue is to enter "local" in the "Append these DNS suffixes (in order)" IPv4 settings of my client.
So it automatically adds a ".local" to all the hostnames.
At the moment I guess the issue is that a "normal" hostname resolution (like "ping test") would be done by the netbios protocol and not DNS, but I might be wrong here.
It might be an issue isolated to Win then. @Mcat12 might know more. Linux definitely uses DNS for ping as well, but - as I said - I'm not sure on the Win end of things.
Since I m using pi-hole as my DHCP server now, the issue is resolved.
Just one thought for improvement.
When DHCP is disabled or enabled and no devices have a lease yet, the section to assign IP-addresses statically does not show up.
So I assumed at first, this was not supported and created a DNSMASQ conf file myself, only to see this option popping up in the webui after devices received their leases.
I m just saying: pi-hole is also a great DHCP server. You should feature it more prominently
The reason why it doesn't show it is that there is nothing to be shown (not lease table) when it is not activated. However - as this was causing confusion more than once - I will change this behavior. Thanks!
For the noob Linux user, can you recommend an easy editor for adding network devices to a hosts file?
Do we use tabs between values in the host file like in Windows?
You should be able to use any whitespace between the IP address and the hostname(s). You can edit it with any text editor, but you need to run it under root (administrator). You can do this by running sudo nano /etc/hosts in the terminal. To save the file, press CtrlX and click Enter a few times to confirm.
Thank you for this line. I've had trouble resolving local hostnames and was just about to scrap pi-hole alltogether since my home network setup is a bit more complex:
192.168.10.1 - Main router, only does NAT forwarding and DNS through my ISP
192.168.10.99 - OpenWRT access point (actually a router but does not do any routing, all ports are in the same VLAN), provides DHCP and DNS for local hostnames (external DNS queries are forwarded to the main router) and stable services
192.168.10.14 - RaspberryPi 3 on ethernet, running pi-hole and other experimental services (e.g. openhab for controlling my AC units)
192.168.10.15 - RaspberryPi 3 on wifi
A plethora of other devices
Since I like my network being stable, I was serving DHCP option 6 (DNS server) with OpenWRT as primary and Main Router as secondary (in case OpenWRT crashes). It's the same way I configured the RaspberryPi statically and Pi-Hole in the setup menu.
Whatever I did, all requests for local hotnames (e.g. Vlad-PC) would not resolve. I hated the idea of duplicating the hosts file with whatever was configured in OpenWRT's DHCP server because it would mean maintaining two lists of devices.
It was your reply who led me to actually disable the main router DNS server from Pi-Hole config, leaving only OpenWRT as the sole DNS server.
My guess is that requests such as "mediaplayer.local" sent by my PC to Pi-Hole got forwarded to both servers, and since Main Router would reply with "no such name" and OpenWRT would reply with the IP address, Pi-Hole prefers the "no such name" reply.
Maybe this is something that can be improved in a future release of Pi-Hole?
I've encountered an odd issue.
Im using this guide to run the domain oysterbay.home. I have no issues with dns lookup for a long list of servers in my environment. things resolve as expected as long as the FQDN is .oysterbay.home.
However I am now trying to setup a redirect. I have external URL that redirects to an internal web server.
When outside my network things work fine. The web server loads as expected and all is well. However internally the same lookup provides the IP address of my firewall instead of my web server.
So I'm trying to put an internal redirect so that when i'm on my lan the same URL redirects to my local web server.
IE:
from public internet myurl.com -> WAN IP address (10.0.0.1)
from lan myurl.com -> lan server IP address (192.168.1.16)
I would think this would be as simple as putting in the IP - FQDN - hostname in lan.list
192.168.1.16 myurl.com webserver
However this doesn't work as expected.
If I do an nslookup for myurl.com from my pihole CLI this IP response address is the lan server IP address
so from pihole CLI:
nslookup myurl.com
returns 192.168.1.16
if I do an nslookup from any other system on my LAN I get the WAN IP address
from workstation on LAN
nslookup myurl.com
returns 10.0.0.1
Yes. I restarted dnsmasq. Can you explain why nslookup myurl.com resolves properly from pihole when called locally but does not when called from other systems on the LAN?
pi-hole:~nslookup