Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    DNS resolver not resolving itself (pfsense FW host)

    Scheduled Pinned Locked Moved DHCP and DNS
    18 Posts 6 Posters 14.8k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      ted
      last edited by

      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?

      1 Reply Last reply Reply Quote 0
      • johnpozJ
        johnpoz LAYER 8 Global Moderator
        last edited by

        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 pfsense

        You should see all your hosts there, and right near the top should be your pfsense name

        An intelligent man is sometimes forced to be drunk to spend time with his fools
        If you get confused: Listen to the Music Play
        Please don't Chat/PM me for help, unless mod related
        SG-4860 24.11 | Lab VMs 2.7.2, 24.11

        1 Reply Last reply Reply Quote 0
        • K
          kpa
          last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • T
            ted
            last edited by

            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?

            1 Reply Last reply Reply Quote 0
            • N
              Nullity
              last edited by

              Do you get anything when you reverse resolve 192.168.0.1?

              Please correct any obvious misinformation in my posts.
              -Not a professional; an arrogant ignoramous.

              1 Reply Last reply Reply Quote 0
              • jahonixJ
                jahonix
                last edited by

                What do you have at  System: General Setup  for hostname and domain?

                1 Reply Last reply Reply Quote 0
                • T
                  ted
                  last edited by

                  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:

                  1 Reply Last reply Reply Quote 0
                  • L
                    limona21
                    last edited by

                    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

                    ![Screen Shot 2017-04-24 at 18.32.02.png](/public/imported_attachments/1/Screen Shot 2017-04-24 at 18.32.02.png)
                    ![Screen Shot 2017-04-24 at 18.32.02.png_thumb](/public/imported_attachments/1/Screen Shot 2017-04-24 at 18.32.02.png_thumb)
                    ![Screen Shot 2017-04-24 at 18.28.24.png](/public/imported_attachments/1/Screen Shot 2017-04-24 at 18.28.24.png)
                    ![Screen Shot 2017-04-24 at 18.28.24.png_thumb](/public/imported_attachments/1/Screen Shot 2017-04-24 at 18.28.24.png_thumb)
                    ![Screen Shot 2017-04-24 at 18.37.23.png](/public/imported_attachments/1/Screen Shot 2017-04-24 at 18.37.23.png)
                    ![Screen Shot 2017-04-24 at 18.37.23.png_thumb](/public/imported_attachments/1/Screen Shot 2017-04-24 at 18.37.23.png_thumb)

                    1 Reply Last reply Reply Quote 0
                    • T
                      ted
                      last edited by

                      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.

                      1 Reply Last reply Reply Quote 0
                      • johnpozJ
                        johnpoz LAYER 8 Global Moderator
                        last edited by

                        And you still have it checked to let dhcp override your settings!!  So pfsense is asking who exactly for its own name?

                        An intelligent man is sometimes forced to be drunk to spend time with his fools
                        If you get confused: Listen to the Music Play
                        Please don't Chat/PM me for help, unless mod related
                        SG-4860 24.11 | Lab VMs 2.7.2, 24.11

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.