Domainname added automatically to hostname in case of ownknown hostnames
Andreas Neubauer last edited by
I am confused about the mystery that when i set a ping to an unkwown hostname, eg test, there will be added home.de. It is than not telling us 'unknown hostname'. Instead of the message unknown host the ping goes to test.home.de. And therefore the DNS System is looking in the public Network.
How can I solve this case, please?
phil.davis last edited by
Many clients (like Windows) will automatically add the domain suffix that they are in when making DNS requests. So when you type just "test" it makes it "test.home.de" and sends it to the DNS server.
Assuming you are using the default DNS Forwarder in pfSense, then you can add a domain override for "home.de" and point it to a DNS server in your LAN that knows the names of the "home.de" devices.
If you don't have a DNS server on your home network, then put the names of things you care about into the Host Overrides section and DNS Forwarder will use them directly.
Then (on pfSense 2.1) you can enter a domain override for "home.de" that does not send requests anywhere, it immediately replies with an unknown response. Put "!" as the DNS server IP address. It is described on the 2.1 DNS forwarder Domain Overrides GUI. Then queries for "home.de" that are not known locally by DNS Forwarder, will not be sent to the internet name servers.
As phil spells out correctly already many systems will auto append the domain they are in, be it you set it up on the system or they got it from the dhcp server, etc.
If home.de is a valid domain on the public net, it normally is not a good idea to use that as your domain on your local network - unless in fact you own said domain.
I would suggest you change your local systems to use say home.lan or home.de.lan or .local or de.home etc.. something where the .tld is not a valid on the public. This should remove any issue of it resolving to a public IP.
You can then resolve these hosts via pfsense dns or as stated create a forwarder in pfsense to send to your local dns that can resolve such domains, etc.