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

    DNS Resolver

    Scheduled Pinned Locked Moved 2.2 Snapshot Feedback and Problems - RETIRED
    186 Posts 44 Posters 148.5k 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.
    • J
      jbc
      last edited by

      I am probably misguided, admittedly, I am not an expect on these matters,
      but what is the problem with dnscrypt used in conjuction with DNSSEC,
      as far as I see, they solve different issues…

      Look at #3: What about DNSSEC? Does this eliminate the need for DNSSEC?

      https://www.opendns.com/about/innovations/dnscrypt/

      And again, I actually don't want to use opendns, but dnscrypt.eu.

      1 Reply Last reply Reply Quote 0
      • D
        doktornotor Banned
        last edited by

        @dstroot:

        @ doktornotor: "If you want DNSSEC, do not use OpenDNS."

        OK - do you have a recommendation what to use?

        If you are using the DNS censorship features from OpenDNS, I have no suggestions.  :P Unbound is just fine as DNSSEC-validating recursive resolver, without any need for forwarding anywhere.

        @jbc:

        but what is the problem with dnscrypt used in conjuction with DNSSEC,
        Look at #3: What about DNSSEC? Does this eliminate the need for DNSSEC?
        https://www.opendns.com/about/innovations/dnscrypt/

        You cannot use OpenDNS servers for DNSSEC validation. They don't validate anything.

        
        >nslookup www.dnssec-failed.org 8.8.4.4
        Server:  google-public-dns-b.google.com
        Address:  8.8.4.4
        
        *** google-public-dns-b.google.com can't find www.dnssec-failed.org: Server failed
        
        >nslookup www.dnssec-failed.org 208.67.222.222
        Server:  resolver1.opendns.com
        Address:  208.67.222.222
        
        Non-authoritative answer:
        Name:    www.dnssec-failed.org
        Addresses:  68.87.109.242
                  69.252.193.191
        
        
        1 Reply Last reply Reply Quote 0
        • J
          jbc
          last edited by

          @doktornotor:

          I see, thank you for clearing that up :)

          edit:
          Incase someone stumbles across this, here is a list of free dnscrypt servers;
          Column 8 notes if they support DNSSEC or not.

          https://github.com/jedisct1/dnscrypt-proxy/blob/master/dnscrypt-resolvers.csv

          1 Reply Last reply Reply Quote 0
          • M
            mir
            last edited by

            For a censor free and no logging  DNS service which supports DNSSEC I can recommend this:
            http://www.censurfridns.dk/

            1 Reply Last reply Reply Quote 0
            • D
              dstroot
              last edited by

              Maybe everyone already knows this but there is not a whole lot of config advice I can find here.  So I thought I'd share what I have figured out.

              It seems you should really only use DNDSEC if you are using unbound as a recursive resolver (which is pretty slow if you are hitting a site for a first time).  Otherwise all is good.

              Otherwise turn DNSSEC off if you you are just using it as a forwarder because it's unlikely to be doing anything with OpenDNS (particularly with Google DNS since that seems to cause issues with unbound if you have it on).

              From this site: https://calomel.org/unbound_dns.html

              
                # If you use forward-zone below to query the Google DNS servers you MUST comment out 
                # this option or all DNS queries will fail:
                # auto-trust-anchor-file: "/var/unbound/etc/root.key"
              
              

              In either configuration, recursive or forwarder, it will cache DNS entries so subsequent requests are very fast.

              Hope this helps someone.

              1 Reply Last reply Reply Quote 0
              • C
                cmb
                last edited by

                @dstroot:

                It seems you should really only use DNDSEC if you are using unbound as a recursive resolver (which is pretty slow if you are hitting a site for a first time).  Otherwise all is good.

                Otherwise turn DNSSEC off if you you are just using it as a forwarder because it's unlikely to be doing anything with OpenDNS (particularly with Google DNS since that seems to cause issues with unbound if you have it on).

                Only use it in forwarder mode if your configured servers for forwarding support DNSSEC. Google's public DNS is fine there, OpenDNS apparently isn't.

                In many situations there won't be much if any difference in query response time between recursive and forwarder. Depends on how much latency between you and that domain's NSes, how much latency there is between you and your forwarders, and whether or not the forwarders have it cached.

                1 Reply Last reply Reply Quote 0
                • C
                  cmb
                  last edited by

                  @cmb:

                  @NobodyHere:

                  We're running the December 10th build. I can confirm issues with a new WAN address breaking unbound. When our PPPoE WAN link gets a new IP address, the resolver will reply with internal IPs set via DHCP clientIDs, but any external DNS lookup made via a system on the LAN fails.

                  DNS resolving on the firewall continues to work, so it's clearly an issue with unbound.

                  https://redmine.pfsense.org/issues/4095

                  The above referenced issue should be fixed. Those who were seeing that, please try on the 31st or newer snapshot.

                  1 Reply Last reply Reply Quote 0
                  • F
                    firewalluser
                    last edited by

                    Since going with the new resolver (unbound) instead of the forwarder, I've noticed periods of non responsiveness occurring where I cant access pf from within the lan, but I also notice a large number of firewall log entries for port 53.

                    A typical entry would look like
                    Jan 1 22:48:56 Direction=OUT WAN my ip address:random port  78.151.235.3:53 UDP

                    but to various ip addresses, not just 78.151.235.3 in this example. When this happens I will typically see 75-100 entries per second which amounts to a DDOS of sorts on a slow ADSL home connection.

                    As resolver is running in default mode, is this normal or to be expected behaviour, and if so, could resolver become a cause for concern for those using pfsense on a variable ip adsl connection aka a typical home connection?

                    pfsense is running on a dual nic Intel NUC 847 http://www.intel.com/content/www/us/en/nuc/nuc-kit-dccp847dye.html with 8Gb of Ram and a 128Gb msata ssd, so performance shouldnt be too bad I would have thought.

                    So is there something I can do to avoid these periods of unresponsiveness, perhaps go back to the forwarder maybe, or change a setting or two?

                    TIA.

                    Capitalism, currently The World's best Entertainment Control System and YOU cant buy it! But you can buy this, or some of this or some of these

                    Asch Conformity, mainly the blind leading the blind.

                    1 Reply Last reply Reply Quote 0
                    • M
                      markuhde
                      last edited by

                      @cmb:

                      @cmb:

                      @NobodyHere:

                      We're running the December 10th build. I can confirm issues with a new WAN address breaking unbound. When our PPPoE WAN link gets a new IP address, the resolver will reply with internal IPs set via DHCP clientIDs, but any external DNS lookup made via a system on the LAN fails.

                      DNS resolving on the firewall continues to work, so it's clearly an issue with unbound.

                      https://redmine.pfsense.org/issues/4095

                      The above referenced issue should be fixed. Those who were seeing that, please try on the 31st or newer snapshot.

                      I just discovered this issue, or one similar to it, today - the hard way. Unbound failing on a machine with a PPPoE link randomly, but DNS still working on the firewall - just not for any client. Build is 2.2-RC (i386)
                      built on Thu Jan 01 06:14:04 CST 2015
                      FreeBSD 10.1-RELEASE-p3

                      I went back to dnsmasq for now.

                      1 Reply Last reply Reply Quote 0
                      • Q
                        q54e3w
                        last edited by

                        Im not sure if this is a real issue or if its particular to my setup but I was having trouble starting DNS Resolver. To maximise my 10be throughput I use a high kern.ipc.maxsockbuf

                        kern.ipc.maxsockbuf: 33554432
                        

                        the so-rcvbuf is derived from this value so in my case, 'so-rcvbuf: 31m' which caused unbound to fail to launch with the following errors

                        Jan 4 08:47:06 php-fpm[6441]: /status_services.php: The command '/usr/local/sbin/unbound -c /var/unbound/unbound.conf' returned exit code '1', the output was '[1420361226] unbound[24922:0] debug: creating udp4 socket 192.168.50.1 53 [1420361226] unbound[24922:0] error: setsockopt(..., SO_RCVBUF, ...) failed: No buffer space available [1420361226] unbound[24922:0] fatal error: could not open ports'
                        

                        adding an advanced option

                        so-rcvbuf: 8m
                        

                        to reduce this 31m down to 8m allows unbound to start correctly.

                        1 Reply Last reply Reply Quote 0
                        • P
                          phil.davis
                          last edited by

                          @irj972:

                          Im not sure if this is a real issue or if its particular to my setup but I was having trouble starting DNS Resolver. To maximise my 10be throughput I use a high kern.ipc.maxsockbuf

                          kern.ipc.maxsockbuf: 33554432
                          

                          the so-rcvbuf is derived from this value so in my case, 'so-rcvbuf: 31m' which caused unbound to fail to launch with the following errors

                          Jan 4 08:47:06 php-fpm[6441]: /status_services.php: The command '/usr/local/sbin/unbound -c /var/unbound/unbound.conf' returned exit code '1', the output was '[1420361226] unbound[24922:0] debug: creating udp4 socket 192.168.50.1 53 [1420361226] unbound[24922:0] error: setsockopt(..., SO_RCVBUF, ...) failed: No buffer space available [1420361226] unbound[24922:0] fatal error: could not open ports'
                          

                          adding an advanced option

                          so-rcvbuf: 8m
                          

                          to reduce this 31m down to 8m allows unbound to start correctly.

                          The unbound docs I have found all are giving 8m as the example for a busy system, so maybe there is something in the unbound compile or FreeBSD that is limiting that socket option to 8m anyway.
                          I made this pull request to limit the calculation to 8m : https://github.com/pfsense/pfsense/pull/1420
                          That might be a practical fix here to protect people like you who have set kern.ipc.maxsockbuf high for other reasons.

                          As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
                          If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

                          1 Reply Last reply Reply Quote 0
                          • W
                            wagonza
                            last edited by

                            Hrmm I have seen values as high as 32M. So further investigation as to why it failed will need to be done.
                            I will see what I can do to replicate.

                            Follow me on twitter http://twitter.com/wagonza
                            http://www.thepackethub.co.za

                            1 Reply Last reply Reply Quote 0
                            • R
                              raab
                              last edited by

                              Not sure if it's been mentioned, on a dual wan setup when one WAN link fails over to the secondary WAN link, DNS lookups start to fail on client devices.

                              When I set outgoing to WAN1 and WAN2 it works fine, rather than the default ALL:

                              1 Reply Last reply Reply Quote 0
                              • M
                                markuhde
                                last edited by

                                THAT may have been the cause of the behaviour I saw that forced me to go back to dnsmasq.

                                1 Reply Last reply Reply Quote 0
                                • M
                                  markuhde
                                  last edited by

                                  @markuhde:

                                  THAT may have been the cause of the behaviour I saw that forced me to go back to dnsmasq.

                                  UPDATE - no that wasn't it, as I already had it set to only allow out over the two interfaces that exist. One of the interfaces is a PPPoE.

                                  1 Reply Last reply Reply Quote 0
                                  • W
                                    wagonza
                                    last edited by

                                    @irj972:

                                    Im not sure if this is a real issue or if its particular to my setup but I was having trouble starting DNS Resolver. To maximise my 10be throughput I use a high kern.ipc.maxsockbuf

                                    kern.ipc.maxsockbuf: 33554432
                                    

                                    Setting kern.ipc.maxsockbuf = 37748736 (36MB) allows Unbound to start, so adding a 4MB buffer to the optimise code section caters for this. As kern.ipc.maxsockbuf increases this buffer grows. Needing more than 32m points towards moving the service off onto its own box.

                                    Follow me on twitter http://twitter.com/wagonza
                                    http://www.thepackethub.co.za

                                    1 Reply Last reply Reply Quote 0
                                    • W
                                      wagonza
                                      last edited by

                                      @markuhde:

                                      @markuhde:

                                      THAT may have been the cause of the behaviour I saw that forced me to go back to dnsmasq.

                                      UPDATE - no that wasn't it, as I already had it set to only allow out over the two interfaces that exist. One of the interfaces is a PPPoE.

                                      So what happened in your setup then?

                                      Follow me on twitter http://twitter.com/wagonza
                                      http://www.thepackethub.co.za

                                      1 Reply Last reply Reply Quote 0
                                      • C
                                        cmb
                                        last edited by

                                        @wagonza:

                                        @markuhde:

                                        @markuhde:

                                        THAT may have been the cause of the behaviour I saw that forced me to go back to dnsmasq.

                                        UPDATE - no that wasn't it, as I already had it set to only allow out over the two interfaces that exist. One of the interfaces is a PPPoE.

                                        So what happened in your setup then?

                                        I'm guessing what happens in that circumstance is he has it doing recursion, which leaves all DNS traffic following the default route, and when the default route is unreachable then nothing will resolve. In that case, enabling default gateway switching is probably the best bet. Alternatively, forwarder mode would be an option as well, specifying at least one DNS server under System>General Setup for each WAN.

                                        1 Reply Last reply Reply Quote 0
                                        • R
                                          raab
                                          last edited by

                                          edit: nvm

                                          1 Reply Last reply Reply Quote 0
                                          • M
                                            markuhde
                                            last edited by

                                            @cmb:

                                            @wagonza:

                                            @markuhde:

                                            @markuhde:

                                            THAT may have been the cause of the behaviour I saw that forced me to go back to dnsmasq.

                                            UPDATE - no that wasn't it, as I already had it set to only allow out over the two interfaces that exist. One of the interfaces is a PPPoE.

                                            So what happened in your setup then?

                                            I'm guessing what happens in that circumstance is he has it doing recursion, which leaves all DNS traffic following the default route, and when the default route is unreachable then nothing will resolve. In that case, enabling default gateway switching is probably the best bet. Alternatively, forwarder mode would be an option as well, specifying at least one DNS server under System>General Setup for each WAN.

                                            Correct, but as far as I know it was the second WAN (the PPPoE one) going down (or changing IPs), not the primary WAN, that killed resolution. Also, why would it still answer queries from localhost but not from machines on the network?

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