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

    Big DNS Problems *Illustrated*

    Scheduled Pinned Locked Moved General pfSense Questions
    82 Posts 5 Posters 16.2k 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.
    • johnpozJ
      johnpoz LAYER 8 Global Moderator
      last edited by johnpoz

      And how often are you seeing unbound restart?

      Resolving can be slower to start.. Sure it might be a few ms longer talking the authoritative ns vs just asking a forwarder what what it has cached.. But once is cached then its no different, and once you resolve to where the authoritative ns is for domainx, then you don't have to walk down the tree from roots again until the whole tree ttl expires.

      Not sure how anyone could care about a few ms, when they are wanting to FORWARD over tls ;)

      If unbound is restarting all the time your going to loose the advantage in caching be it you forward or resolve.

      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.8, 24.11

      S 1 Reply Last reply Reply Quote 0
      • S
        skalyx @johnpoz
        last edited by

        @johnpoz

        Haha yes I know, but it is abnormally slow.
        Just found the cause. It restarts about every minute. Here is a sample of log:
        May 27 21:25:24 unbound 84243:0 notice: Restart of unbound 1.9.1.
        May 27 21:26:33 unbound 84243:0 notice: Restart of unbound 1.9.1.
        May 27 21:27:17 unbound 84243:0 notice: Restart of unbound 1.9.1.
        May 27 21:27:48 unbound 84243:0 notice: Restart of unbound 1.9.1.
        May 27 21:28:18 unbound 84243:0 notice: Restart of unbound 1.9.1.
        May 27 21:30:28 unbound 84243:0 notice: Restart of unbound 1.9.1.
        .... same

        Putting DNS resolver in forwarding fixes the issues. I need to see if it causes problem (it normally does) and check the logs...

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

          restarting that often is going to be make it useless.

          Do you have it set to register dhcp or vpn clients? You prob want to bump its log level up to try and figure out why its restarting like that.. Which makes it useless.. how can it resolve or even forward if its restarting every few seconds. No wonder you having pain with dns.

          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.8, 24.11

          S 1 Reply Last reply Reply Quote 1
          • GertjanG
            Gertjan
            last edited by

            Checkout the DHCP server log.

            Every time a new lease comes in, you have many devices, some with very short lease times, know that unbound is restarted.

            Solution for this issue :

            f7c21ae7-159d-4f33-90d9-5d889a3a2981-image.png

            Uncheck DCHP Registration.
            Where possible, leave all your devices on DHCP - but make static leases using their MAC addresses.

            On my pfSense installations, unbound restarts one a day, or less - other events can trigger a restart also. This means it keeps up it's DNS cache, and that's what's counts.

            No "help me" PM's please. Use the forum, the community will thank you.
            Edit : and where are the logs ??

            1 Reply Last reply Reply Quote 1
            • S
              skalyx @johnpoz
              last edited by

              @johnpoz
              Hmm. No VPN clients. Yes, I had register DHCP leases in the DNS resolver.
              @Gertjan Thanks for your answer. I do not understand why it would restart nor how DHCP leases in a DNS resolver works but I just unchecked it according to your advice! I hope it will fix my issues.
              I have about 80 clients at home (Google home, smartphones, etc.) where 10 of my clients such as my Synology NAS, smart switches, and access points are on static ips. Are you talking about this or about DHCP related to DNS?

              GertjanG 1 Reply Last reply Reply Quote 0
              • S
                skalyx
                last edited by skalyx

                I have a question. It may sound stupid but I just am trying to understand things correctly.
                So, now I have this config:

                • DNSSEC Support activated

                • Forwarding mode, DNS over TLS, and Register DHCP leases in the DNS Resolver deactivated
                  However, will my PFSense router be able to encrypt my DNS queries with DNS over TLS with my current config? I want to limit my ISP eavesdropping on me as much as possible. Moreover, I would like to ask if my PFsense router is using DNSSEC with Cloudflare's DNS servers? I just activated DNSSEC support. If it does not use DNSSEC and DNS over TLS, what could I do?

                Thanks,

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

                  I miss read that.

                  If your resolving then no you can not do dns over TLS.. for that to work every single NS on the planet would have to be listening and support dns over tls.

                  If you think your ISP is watching your traffic - for what possible reason you can only imagine... What do they get from knowing that you asked for pfsense.org ? Or p0rn.tld -- then tighten up your tinfoil hat and run everything, even your dns queries through a vpn.

                  Because clearly those vpn services are way more trust worthy than your ISP... I mean they state it right on their website that they don't log <rolleyes> ;)

                  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.8, 24.11

                  S 2 Replies Last reply Reply Quote 0
                  • S
                    skalyx @johnpoz
                    last edited by

                    @johnpoz Hahah. Yes. I saw your previous message ;p. I understood the forwarding mode does not require me to do anything.

                    So... The only way to get DNS over TLS for me would be to forward all my requests to DNS servers that accept it such as Cloudflare ones?

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

                      If you want to use dns over tls, then yes you have to "forward" to a dns provider that supports it. You can not resolve over tls.

                      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.8, 24.11

                      1 Reply Last reply Reply Quote 0
                      • S
                        skalyx @johnpoz
                        last edited by

                        @johnpoz
                        Hahah yes. I actually am studying security so I just want to learn. That's not my aim to be fully secured and so on. My ISP won't learn much but they can guess a lot ! It is good for me if things like DNS over TLS and so on can be activated easily. PFsense has such amazing capacities and I am still learning. :)

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

                          Do you really think your isp is taking the trouble to snff all dns traffic that goes across their network? Compile it and parse it and put it some database to where billy went on tuesday ;)

                          Its one thing if you just going to hand them all your queries directly by asking their dns servers... But when you resolve you talk to roots, and specific authoritative ns all over the planet for the domains you look for.

                          Keep in mind that if they really wanted to spy on you, they can just look to see what is in your http headers for where your going.. And even if using https, the sni is going to contain where you were going, simple enough to look in the client hello packet and see where you were going..

                          sni.png

                          No need to sniff the dns ;)

                          If you think hiding your dns queries prevents your isp from knowing where your going.. No! All it does is make it a bit harder..

                          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.8, 24.11

                          S 1 Reply Last reply Reply Quote 1
                          • S
                            skalyx @johnpoz
                            last edited by

                            @johnpoz Thanks for all the help and knowledge you give me! That's for sure. I did not think about HTTP headers. I forgot they have access to that as my internet traffic goes to them.

                            However, do you think it would be a problem to activate DNS over TLS with my current configuration (means no forwarding mode activate). It will create unnecessary traffic as you stated and will only do DNS over TLS with servers that accept it, isn't it? Will it nevertheless be working? Will it be useless though?

                            Thanks,

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

                              Its only a couple of clicks to get dns over tls working in pfsense and unbound...

                              If you want to do that you HAVE to forward!!

                              Its not like unbound can ask every NS it has to talk to to find what your looking for if it supports tls, and if not just query over normal udp 53..

                              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.8, 24.11

                              S 1 Reply Last reply Reply Quote 0
                              • S
                                skalyx @johnpoz
                                last edited by

                                @johnpoz Yes, I will stick with no DNS over TLS to avoid problems.

                                I, however, noticed from the time I deactivated "Register DHCP leases in the DNS Resolver" that my DNS resolver does not restart (log from 6hours). However, I often get: ERR_CONNECTION_TIMED_OUT
                                DNS PROB STARTED
                                DNS_PROBE_FINISHED_NXDOMAIN
                                I also get very slow DNS responses even on known domains such as Google.com. It is very strange... I rebooted everything but still the same problem. Websites with forwarding mode got loaded in about 2-3 seconds and now it is about 10 seconds. So it gets very slow... Do you have any idea, guys?

                                Thnks

                                1 Reply Last reply Reply Quote 0
                                • GertjanG
                                  Gertjan @skalyx
                                  last edited by

                                  @skalyx said in Big DNS Problems *Illustrated*:

                                  I do not understand why it would restart nor how DHCP leases in a DNS resolver works but I just unchecked it according to your advice! I hope it will fix my issues.
                                  I have about 80 clients at home (Google home, smartphones, etc.) where 10 of my clients such as my Synology NAS, smart switches, and access points are on static ips. Are you talking about this or about DHCP related to DNS?

                                  When you check "DHCP Registration" in the the Resolver setup page, every new lease that comes will get inserted in the DNS cache. This way you can address that device with it's name instead of its IP.
                                  To do this, the DHCP server process (actually, a sub program, called dhcpleases) will signal unbound the resolver. This is done by a restart, so unbound will re read all its config files again.
                                  Unchecking DHCP Regsitratio stops the unbound restarts related to new DHCP leases.

                                  No "help me" PM's please. Use the forum, the community will thank you.
                                  Edit : and where are the logs ??

                                  S 1 Reply Last reply Reply Quote 0
                                  • S
                                    skalyx @Gertjan
                                    last edited by

                                    @Gertjan
                                    Thanks for the explanation!
                                    Deactivating it could cause some issues? Is it the reason why I have these issues:
                                    I, however, noticed from the time I deactivated "Register DHCP leases in the DNS Resolver" that my DNS resolver does not restart (log from 6hours). However, I often get: ERR_CONNECTION_TIMED_OUT
                                    DNS PROB STARTED
                                    DNS_PROBE_FINISHED_NXDOMAIN
                                    I also get very slow DNS responses even on known domains such as Google.com. It is very strange... I rebooted everything but still the same problem. Websites with forwarding mode got loaded in about 2-3 seconds and now it is about 10 seconds. So it gets very slow... Do you have any idea, guys?

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

                                      simple dig command for the domains your trying to access, nslookup even.

                                      You understand that NX domains, means what you were locking for doesn't exisit..

                                      It is impossible to troubleshoot with such info... You have to give us the actual domain you were trying to go too.. Let us see an actual output of the lookup.

                                      $ dig www.google.com                                                      
                                                                                                                
                                      ; <<>> DiG 9.14.1 <<>> www.google.com                                     
                                      ;; global options: +cmd                                                   
                                      ;; Got answer:                                                            
                                      ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 3890                  
                                      ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1      
                                                                                                                
                                      ;; OPT PSEUDOSECTION:                                                     
                                      ; EDNS: version: 0, flags:; udp: 4096                                     
                                      ;; QUESTION SECTION:                                                      
                                      ;www.google.com.                        IN      A                         
                                                                                                                
                                      ;; ANSWER SECTION:                                                        
                                      www.google.com.         2824    IN      A       172.217.4.196             
                                                                                                                
                                      ;; Query time: 1 msec                                                     
                                      ;; SERVER: 192.168.3.10#53(192.168.3.10)                                  
                                      ;; WHEN: Tue May 28 05:30:25 Central Daylight Time 2019                   
                                      ;; MSG SIZE  rcvd: 59                                                     
                                      

                                      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.8, 24.11

                                      S 1 Reply Last reply Reply Quote 0
                                      • S
                                        skalyx @johnpoz
                                        last edited by

                                        @johnpoz Hello, thanks for the reply.
                                        I actually get these DNS error messages for a while but then it reloads and works! So I can access the website after the error message but it takes about 8 seconds. This is the case with any domain (cloudflare.com, youtube.com, reddit.com, netgate.com, etc.). It sometimes happens (like every 30min) and then everything gets back to normal. I cannot see anything in my log but I will reply to the post whenever the problem happens again with detailed logs.

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

                                          Bring on encrypted SNI! 😉

                                          S 1 Reply Last reply Reply Quote 0
                                          • S
                                            skalyx @stephenw10
                                            last edited by

                                            @stephenw10 sorry Steve. I do not know what you are talking about hahaha

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