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

    Setting up DNS *correctly*

    Scheduled Pinned Locked Moved DHCP and DNS
    dnsdns resolutiondns resolversg-3100
    20 Posts 3 Posters 4.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.
    • KOMK
      KOM
      last edited by

      @bwalkco said in Setting up DNS *correctly*:

      it shows my ISP as my DNS server.

      Make sure that System - General Setup - DNS Server Settings - DNS Server Override is unchecked, otherwise your ISPs DNS will be forced upon you via DHCP.

      bwalkcoB 1 Reply Last reply Reply Quote 1
      • bwalkcoB
        bwalkco @KOM
        last edited by

        @KOM verified it is unchecked. I also noticed that "DNS Query Forwarding" wasn't checked. I enabled that.

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

          if you enabled "forwarding" in unbound then your not "resolving"

          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

          bwalkcoB 1 Reply Last reply Reply Quote 0
          • bwalkcoB
            bwalkco @johnpoz
            last edited by

            @johnpoz sorry, I'm not sure I follow. I'd like for the Netgate to handle all DNS queries it can and forward requests when it can't resolve. If that is not possible, then I'd like to have the Netgate handle all internal DNS and direct all external requests to 1.1.1.1 / 1.0.0.1

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

              @bwalkco said in Setting up DNS *correctly*:

              forward requests when it can't resolve.

              And again it doesn't work that way!!!!

              You either resolve, or you forward... Its not a fall back sort of scenario..

              If you want to forward - sure have at it, zero reason to have the checkbox for dnssec then..

              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

              bwalkcoB 1 Reply Last reply Reply Quote 0
              • KOMK
                KOM
                last edited by

                A resolver uses the DNS root hints to find the authoritative server for the queried domain and then query that server. A forwarder just forwards all queries to some other upstream DNS. You need to decide what you want.

                bwalkcoB 1 Reply Last reply Reply Quote 1
                • bwalkcoB
                  bwalkco @johnpoz
                  last edited by

                  @johnpoz Does that also apply to local queries (I assume no)? My other reply to you may add some clarity.

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

                    If you ask unbound for something.domain.tld, and there is no host override or locally registered entry for that then it will either forward or resolve it depending on your settings.

                    With some caveats to how you setup the zone in unbound, transparent, static, etc. and what the domain of the query is for..

                    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 1
                    • bwalkcoB
                      bwalkco @johnpoz
                      last edited by

                      @johnpoz Ok, my apologies. Sorry if this is frustrating you. I'm just trying to learn. So it sounds like I cannot resolve internal requests and forward external requests. Thank you.

                      1 Reply Last reply Reply Quote 0
                      • bwalkcoB
                        bwalkco @KOM
                        last edited by

                        @KOM said in Setting up DNS *correctly*:

                        A resolver uses the DNS root hints to find the authoritative server for the queried domain and then query that server. A forwarder just forwards all queries to some other upstream DNS. You need to decide what you want.

                        Great, thank you! Appreciate it.

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

                          Yes you can query unbound for you local records, and forward other domains.. Wouldn't use the term resolving in that sense when talking about unbound.. Which out of the box is a "resolver" and doesn't forward..

                          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

                          bwalkcoB 1 Reply Last reply Reply Quote 0
                          • bwalkcoB
                            bwalkco @johnpoz
                            last edited by

                            @johnpoz said in Setting up DNS *correctly*:

                            Yes you can query unbound for you local records, and forward other domains.. Wouldn't use the term resolving in that sense when talking about unbound.. Which out of the box is a "resolver" and doesn't forward..

                            Appreciate the clarity! Thank you. Like I mentioned, it's been a while since I've done this so my nomenclature may be a bit off. After I checked the "Register DHCP leases in DNS resolver", I am able to ping by name locally. That problem is solved. With "DNS Query Forwarding" checked, I am now sending all external (www.example.com) DNS queries to 1.1.1.1 / 1.0.0.1, correct?

                            If I am understanding you correctly if I want my Netgate to be the authoritative name server for external queries (from any device behind the SG-3100) I just need to disable "DNS Query Forwarding"?

                            1 Reply Last reply Reply Quote 0
                            • KOMK
                              KOM
                              last edited by

                              An authoritative name server is a DNS server that has the ultimate authority over the addresses in a domain. Resolvers talk directly to authoritative servers. Forwarders talk to any specified upstream DNS server.

                              By default, pfSense has an enabled resolver and disabled forwarder. Resolver can act as a forwarder if you tell it to.

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

                                @bwalkco said in Setting up DNS *correctly*:

                                f I want my Netgate to be the authoritative name server for external queries

                                What - NO!! For starters unbound not meant to be authoritative for any domain.. Can it ack like one - sure kind of.. If you want to run an authoritative NS for a domain. Run bind..

                                I think your just throwing out terms you have heard without any understanding of their meaning...

                                So any NS will return what is in its cache or local data when asked. Depending if its a resolver or forwarder is what happens when it is asked to do recursion..

                                Normally!!! an authoritative NS will not do recursion... Since normally these are open to the public internet because people want to resolve what they are authoritative for.. And asking them to also do recursion can lead to big issues and ability to answer the queries for what they are authoritative for, etc..

                                Unbound is not meant to be authoritative for any zone... It will not hand back a SOA record pointing to itself when you ask for something it does have records for, etc. Can it do that - yeah with some tweaking..

                                What it really is meant to do is be a caching ns, that resolves.. Yes you can put in neat stuff local host overrides - really just shit your perm storing in its cache... And sure you can put in domain overrides that tells it hey don't resolve domainX.tld - ask NS xyz..

                                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

                                bwalkcoB 1 Reply Last reply Reply Quote 0
                                • bwalkcoB
                                  bwalkco @KOM
                                  last edited by

                                  @KOM said in Setting up DNS *correctly*:

                                  An authoritative name server is a DNS server that has the ultimate authority over the addresses in a domain. Resolvers talk directly to authoritative servers. Forwarders talk to any specified upstream DNS server.

                                  By default, pfSense has an enabled resolver and disabled forwarder. Resolver can act as a forwarder if you tell it to.

                                  Gotcha, ok! I think some of my old web hosting lingo (from years ago) is being conflated in my head. Appreciate the clarity around that.

                                  1 Reply Last reply Reply Quote 0
                                  • bwalkcoB
                                    bwalkco @johnpoz
                                    last edited by

                                    @johnpoz said in Setting up DNS *correctly*:

                                    I think your just throwing out terms you have heard without any understanding of their meaning...

                                    Sorry you came to that conclusion...have a great day 👍

                                    1 Reply Last reply Reply Quote 0
                                    • KOMK
                                      KOM
                                      last edited by

                                      If you want to forward all DNS requests to 1.1.1.1, either:

                                      1. disable resolver, enable forwarder and put 1.1.1.1 under System - General Setup - DNS Servers.

                                      or

                                      1. enable resolver, disable forwarder, check DNS Query Forwarding and put 1.1.1.1 under System - General Setup - DNS Servers.
                                      bwalkcoB 1 Reply Last reply Reply Quote 2
                                      • bwalkcoB
                                        bwalkco @KOM
                                        last edited by

                                        @KOM said in Setting up DNS *correctly*:

                                        enable resolver, disable forwarder, check DNS Query Forwarding and put 1.1.1.1 under System - General Setup - DNS Servers.

                                        This is the exact configuration I went with. Thank you very much for the help!

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