DNS resolver not resolving itself (pfsense FW host)
-
That's exactly my problem. All hosts on the local lan and internet resolve fine EXCEPT the pfsense gw box itself.
My pfsense gw/router is named "gw.local.lan". If I use the Diagnostics -> DNS lookup page and put in gw.local.lan I am unable to resolve the ip 192.168.0.1. Yes. Local host (127.0.0.1) does respond in ~2ms but does not have an answer for gw.local.lan. Local host 127.0.0.1 is able to resolve all my other host such as tv.local.lan, NAS.local.lan, laptop.local.lan etc.
Any thoughts? Can I manually edit the unbound.conf file and add a entry for gw.local.lan?
-
You shouldn't have too.. You sure thats its name.. And you have the host name and the local.lan in the domain section. Can you post up your screenshot like I showed of mine.
But if need be you can create a host override for any name. But you shouldn't have too.. clearly pfsense should know its own name, so gets me to think something not as you think.
You can always look in etc/hosts what do you see there?
[2.3.2-RELEASE][root@pfsense.local.lan]/root: cat /etc/hosts
127.0.0.1 localhost localhost.local.lan
::1 localhost localhost.local.lan
192.168.9.253 pfsense.local.lan pfsense
2001:snipped::1 pfsense.local.lan pfsenseYou should see all your hosts there, and right near the top should be your pfsense name
-
Also verify that you have the 127.0.0.1 entry in /etc/resolv.conf as the first line, I'm not sure based on your posts if you already checked that.
-
So yeah, my /etc/hosts file did NOT have an entry for the pfsense gw. I manually added "192.168.0.1 gw.local.lan gw" and of course things worked fine. However my changes don't persist a reboot. For now I've added a manual host override entry under DNS resolver for gw.local.lan. This ensures that "192.168.0.1 gw.local.lan gw" persists a reboot in /etc/hosts.
Something odd is going on here though. As you mentioned the pfsense gw should be automatically added to the /etc/hosts file. I've double checked my System -> General Setup page, my host and domain are entered correctly. This is further confirmed by the fact that when I ssh to a shell my login prompt shows:
[2.3.2-RELEASE][admin@gw.local.lan]/root:
Any thoughts?
-
Do you get anything when you reverse resolve 192.168.0.1?
-
What do you have at System: General Setup for hostname and domain?
-
W/o the static host override entry a nslookup or ping for gw.local.lan fails, "cannot resolve gw.local.lan: Unknown host"
With the static host overide entry nslookups and pings to gw.local.lan works fine.
In my System -> General Setup page, I have
Hostname: gw
Domain: local.lan
I'm pretty sure my hostname is setup correctly, when I ssh to a shell my login prompt shows:
[2.3.2-RELEASE][admin@gw.local.lan]/root:
-
I have the same issue - pfsense is resolving all clients with static DHCP mappings however it is not resolving itself. It worked before but I restored pfsense to factory settings due to OpenVPN (unable to conact deamon) problem - which didnt solve the issue.
I also have a very basic setup with no forwarding of queries and nothing like that. DNS resolver is up and running and DNS Server Override is checked. I did check the host file and in fact there is no entry for the pfsense itself but I don't think I should put it there manually. It should've known its name right? When I run "nslookup pfsense" in the terminal is does not return an answer.
The configuration is so bare I don't know what to check. Any ideas?
I am running version 2.3.3_1




 -
I never found the root cause, tried the same as you and performed a reset to no avial. I left a manual host override entry under DNS resolver for gw.local.lan, ensuring that "192.168.0.1 gw.local.lan gw" persists a reboot in /etc/hosts. Everything else is working fine and as expected.
-
And you still have it checked to let dhcp override your settings!! So pfsense is asking who exactly for its own name?