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

    DNS Search Binding Order - Intranet then Internet

    Scheduled Pinned Locked Moved General pfSense Questions
    5 Posts 3 Posters 608 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.
    • penguinpagesP
      penguinpages
      last edited by

      In proper configuration I have not <yet> discovered a good guide on proper DNS configuration.

      I want to ensure that local users get Intranet DNS resolution (this is via DHCP lease option of local AD server)... but also.. the router itself, and VPN users.

      I know that best practice domain names for intranet have moved away from .local construct.. but this is what I have. Lets call it penguinpages.local

      My internet domain name is via DDNS service lets call it penguinpages.ddns.edu

      Local DNS server 172.16.100.22 ados.penguinpages.local
      e9b1536b-fa15-4678-a2fb-881a74783015-image.png

      I want to correct this so later on when I do more with Certs and sign SANS cert with domain / intranet and internet, It will resolve.

      I thought the way to fix this was that the DNS search (default of parallel) would be within pfsense of stated IP ( general settings : 172.16.100.22) as well as external DNS that it links to and gets from DHCP on WAN from ISP.

      Not sure.. but poked around and thought maybe it was DNS Forwarder presedence
      f389baeb-4c19-42b5-997b-aef2bb65d257-image.png
      Resolution: change DNS forwarder to enable
      Broken..

      But.. nope.

      If someone has some has example or RTFM to where I can read up and correct DNS search paths for internal router, and VPN connected users

      THanks,

      1 Reply Last reply Reply Quote 0
      • stephenw10S
        stephenw10 Netgate Administrator
        last edited by

        The resolver (Unbound) runs by default rather than the forwarder (DNSmasq) but it can run in forwarding mode.
        However that shouldn't be required here. You should be able to enter the host or domain override to the resolver.
        If you test in Diag > DNS Lookup you can see all the DNS servers configured and what they are returning.

        The actual order is determined in System > General setup in 'DNS Resolution Behavior'.
        https://docs.netgate.com/pfsense/en/latest/config/general.html#dns-resolution-behavior

        Steve

        penguinpagesP 1 Reply Last reply Reply Quote 0
        • penguinpagesP
          penguinpages @stephenw10
          last edited by

          @stephenw10

          I kind of figured as much. Unbound I thought would do parallel search within context of services listed. Ex: Search penguinpages.local (intranet) it would find just in that the DNS SOA for that zone is within the environment and in list.

          Host "ados.penguinpages.local" could not be resolved.
          DNS Lookup
          Hostname
          ados.penguinpages.local
          Timings
          Name server	Query time
          127.0.0.1	52 msec
          75.75.75.75	119 msec
          75.75.76.76	316 msec
          172.16.100.22	0 msec
          

          That host .22 is the SOA (windows AD for zone)

          So no reason it would / should not get result.

          The only DNS I A$$umed I need to setup is intranet system, and then assumed it would append to search list what it got from DHCP on WAN side.

          285859a1-5eba-451e-bea8-6d1eb7a68c28-image.png

          [2.6.0-RELEASE][admin@rt1.penguinpages.local]/root: cat /etc/res
          resolv.conf      resolvconf.conf
          [2.6.0-RELEASE][admin@rt1.penguinpages.local]/root: cat /etc/resolv.conf
          nameserver 127.0.0.1
          nameserver 75.75.75.75
          nameserver 75.75.76.76
          nameserver 172.16.100.22
          search hsd1.ga.comcast.net.
          [2.6.0-RELEASE][admin@rt1.penguinpages.local]/root: ping ados.penguinpages.local
          ping: cannot resolve ados.penguinpages.local: Unknown host
          [2.6.0-RELEASE][admin@rt1.penguinpages.local]/root: nslookup - 172.16.100.22
          > ados
          Server:         172.16.100.22
          Address:        172.16.100.22#53
          
          ** server can't find ados: SERVFAIL
          > ados.penguinpages.local
          Server:         172.16.100.22
          Address:        172.16.100.22#53
          
          Name:   ados.penguinpages.local
          Address: 172.16.100.22
          Name:   ados.penguinpages.local
          Address: 172.16.101.22
          Name:   ados.penguinpages.local
          Address: 192.168.10.22
          >
          

          Seems the base OS when configured to use local DNS did not / does not use the server specified, nor does it set DNS context.

          I am sure this is just something I misconfigured, but I followed what seemed logical. Set local DNS server + 8.8.8.8 (google)-> Assume it would then bring those internal to Unbound services.

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

            @penguinpages said in DNS Search Binding Order - Intranet then Internet:

            Set local DNS server + 8.8.8.8 (google)-> Assume it would

            Doesn't work that way..

            When you set more than 1 dns on a client, you really have no idea which it might ask. If it asks google for something.local it would get back a NX, and wouldn't ask any other ns it has listed.

            btw .local is a horrible choice for a local domain tld.. .local is special use.. don't use it or your going to run into issues.

            use home.arpa as you local domain name or whatever.home.arpa etc..

            so you would have host.whatever.home.arpa as a fqdn for your local resources or just host.home.arpa, etc.

            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
            • stephenw10S
              stephenw10 Netgate Administrator
              last edited by

              Mmm, either uncheck 'DNS Server Override' and set 'DNS Resolution Behavior' to Use remote.

              Or set a domain override for penguinpages.local in Unbound to use the AD server.

              Steve

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