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

    DNS randomly stops working

    Scheduled Pinned Locked Moved DHCP and DNS
    39 Posts 14 Posters 10.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.
    • GertjanG
      Gertjan @SashLi
      last edited by

      @sashli said in DNS randomly stops working:

      dig @127.0.0.1 pfsense.org +short

      Let's add some details.
      Lot's of details.

      dig @127.0.0.1 pfsense.org +trace
      

      But the real issue is here :

      net.c:536: probing sendmsg() with IP_TOS=b8 failed: Can't assign requested address
      

      'dig' is not family of, or related to 'unbound'.
      dig comes from the bind FreeBSD package 'bind-tools'.

      "net.c" is one of the main source code files, and it can not "use the IP you gave" ... it can not use "127.0.0.1" so it can contact unbound over 127.0.0.1 port 53 UDP.

      When I stop unbound - so no one is listing on 127.0.0.1 port 53, and execute a
      dig @127.0.0.1 pfsense.org +trace
      it comes back after several seconds with a logical "connection timed out; no servers could be reached"

      You have interface problems ..... and not 'unbound' problems. unbound is yet another victim of the real issue.

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

      J S 2 Replies Last reply Reply Quote 1
      • J
        juniper @Gertjan
        last edited by

        @gertjan yes problem is related to interfaces...

        if i try to ping 127.0.0.1 i've the same error...

        Someone opened a bug for that?

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

          @gertjan thanks for your feedback but it looks really like a problem with the localhost 127.0.0.1 interface. I just reinstalled the ntopng and this has also problems starting and running services. Issue leading in the same direction here "Could not connect to Redis at 127.0.0.1:6379: Can't assign requested address'".

          The question is: why is the interface on the localhost not reachable by the system itself ? Any idea ?

          J 1 Reply Last reply Reply Quote 0
          • J
            juniper @SashLi
            last edited by

            @sashli try to ping other interfaces from pfsense itself...

            i think is jail related or something similar...

            S 1 Reply Last reply Reply Quote 0
            • S
              SashLi @juniper
              last edited by

              @juniper just found this ticket in redmine, not sure if this can be an issue created by this gatewax problem

              IPv4 link-local (169.254.x.x) gateway does not function

              J GertjanG 3 Replies Last reply Reply Quote 0
              • J
                juniper @SashLi
                last edited by

                @sashli i don't know...

                I can add an information, my pfsense installation is on proxmox ve virtual machine.

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

                  @sashli said in DNS randomly stops working:

                  @juniper just found this ticket in redmine, not sure if this can be an issue created by this gatewax problem

                  IPv4 link-local (169.254.x.x) gateway does not function

                  That's a special case, using IP's like 169.254.0.0/16.
                  There is a small patch for this - jimp posted one yesterday.

                  I've updated my pfSense at home (Hyper-V = VM) based : it's just perfect.
                  I've just updated my work pfSense, they update went just fine. Again perfect.

                  127.0.0.1 isn't even an external driver related, as it is part of the build in 'kernel' IP stack facilities.

                  Use another VM host - if you have a Windows 10 Pro somewhere, you could make one right away, or install pfSense bare bone and you see that their is - can not be - localhost issues, as it will break everything.

                  Just to be sure : your issue exists after you reset to default - and you only changed the password (!! did NOT import your settings !!) ?

                  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 0
                  • J
                    juniper @SashLi
                    last edited by

                    @sashli

                    Problem appear if i insert 127.0.0.1 on GENERAL SETUP---DNS Server Settings

                    I use to have there 127.0.0.1 if pfsense is a dns resolver.

                    If i config with 127.0.0.1 GENERAL SETUP---DNS Server Settings as a default pfsense dns server there is the problem with interface lo0.

                    Cool_CoronaC GertjanG 2 Replies Last reply Reply Quote 0
                    • Cool_CoronaC
                      Cool_Corona @juniper
                      last edited by

                      @juniper Then you create a loopback??

                      If nothing is in General setup then it uses localhost.

                      J 1 Reply Last reply Reply Quote 0
                      • J
                        juniper @Cool_Corona
                        last edited by

                        @cool_corona no i use 127.0.0.1 as dns resolver for pfsense.

                        Cool_CoronaC 1 Reply Last reply Reply Quote 0
                        • Cool_CoronaC
                          Cool_Corona @juniper
                          last edited by

                          @juniper Leave it blank and

                          c42bdb5c-69d0-4613-aaa1-c3ee3c07a586-billede.png

                          And reboot

                          J 1 Reply Last reply Reply Quote 0
                          • J
                            juniper @Cool_Corona
                            last edited by

                            @cool_corona yes it works!

                            Problem appear if i use 127.0.0.1 in general setup.

                            If i set an external dns and set dns resolution behavior as you suggest all working fine.

                            Thank you.

                            S 1 Reply Last reply Reply Quote 0
                            • S
                              SashLi @juniper
                              last edited by

                              @juniper exactly its a problem when 127.0.0.1 is listed in the general setup of the DNS server list.

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

                                @juniper

                                Why do you want to add 127.0.0.1 here :

                                3197d809-b8b8-429c-a2ea-0c84b2205d2d-image.png

                                ?

                                As you can see, I have nothing.
                                Because that's default : nothing.

                                Still, the magic is happening :

                                68290cff-a748-408d-982a-c8786d8d29b0-image.png

                                I hope (didn't test) that pfSense is intelligent enough that, when 127.0.0.1 is added here :
                                5b501b55-8d28-4178-bd89-5705249afe46-image.png

                                It will ignore that 'request' as 127.0.0.1 is already there.
                                Here it is :
                                /etc/resolv.conf .......

                                nameserver 127.0.0.1
                                search your-domain.tld
                                

                                Ok, I broke my won rules ā„¢ Ā© and added some DNS settings myself.

                                9b5470ef-d9e7-47a1-8158-ea67587c4040-image.png

                                5878155b-aae4-4e95-b20c-414957138a27-image.png

                                but /etc/resolv.conf didn't change.
                                I'm missing something ....

                                But pfSense (unbound) works.

                                edit : this is a no go :

                                [2.5.1-RELEASE][admin@pfsense.my-domain.tld]/root: dig @127.0.0.1 google.com
                                net.c:536: probing sendmsg() with IP_TOS=b8 failed: Can't assign requested address
                                net.c:536: probing sendmsg() with IPV6_TCLASS=b8 failed: No route to host

                                Ok. Great.
                                Who calls Houston ?

                                Solution : remove ::1 and 127.0.0.1 from the General settings as it was
                                Useless (before)
                                Break things (today).

                                So, please : don't do that ;)

                                edit : even why I removed ::1 and 127.0.0.1 I had could not use "127.0.0.1" any more.

                                It was :

                                net.c:536: probing sendmsg() with IP_TOS=b8 failed: Can't assign requested address
                                

                                all the time now.

                                Si, guys,I don't quiet understand what I'm seeing, but I see what you see.

                                Unbound wasn't listening to 127.0.0.1 any more - I restarted unbound : didn't help. I had to restart "127.0.0.1" - if possible.
                                I had to reboot pfSense - as this is a way to 'restart' the kernel.

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

                                E 1 Reply Last reply Reply Quote 1
                                • E
                                  e-1-1 @Gertjan
                                  last edited by

                                  @gertjan Personally had 127.0.0.1 from before that "DNS Resolution Behavior" section existed, a couple of years at least.
                                  If memory serves right šŸ¤”
                                  Guess that's because we wanted to ensure the system used its own resolver, and that only.

                                  Was stunned when all DNS resolution stopped after upgrading to 2.5.1. Not even pkg worked :)
                                  But some dig(ging) lead to the entry removal, then restoration of DNS service.

                                  No bug listed as of now that I can find, but @jimp could we have this case covered in the pfsense-upgrade script that gets updated when pressing "13" in the CLI? It would eliminate the 127.0.0.1 entry, as workaround for now in place of debugging the lovely

                                  net.c:536: probing sendmsg() with IP_TOS=b8 failed: Can't assign requested address
                                  

                                  bork message.

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

                                    I am also having this problem after upgrading directory from 2.4.5 CE to 2.5.1 on a Sophos SG-210.
                                    In my case, enabling unbound on the Service Watchdog list restarts the service, but then the CPU is pegged at 100% and resolution still doesn't happen. Restarting the firewall works. I have not yet checked the PID or socket status during an outage, but I suspect unbound crashes, thinks its still running but can't clean itself up.

                                    One thing I noticed on my system is pkg info unbound says Python is enabled, even though it is disabled in the configuration. I manually restarted after toggling Python on and off. Is this even relevant?

                                    [2.5.1-RELEASE][admin@myfirewallnotyours]/root: pkg info unbound
                                    unbound-1.13.1
                                    Name           : unbound
                                    Version        : 1.13.1
                                    Installed on   : Thu Apr 15 03:10:26 2021 CDT
                                    Origin         : dns/unbound
                                    Architecture   : FreeBSD:12:amd64
                                    Prefix         : /usr/local
                                    Categories     : dns
                                    Licenses       : BSD3CLAUSE
                                    Maintainer     : jaap@NLnetLabs.nl
                                    WWW            : https://www.nlnetlabs.nl/projects/unbound
                                    Comment        : Validating, recursive, and caching DNS resolver
                                    Options        :
                                            DNSCRYPT       : off
                                            DNSTAP         : off
                                            DOCS           : off
                                            DOH            : on
                                            ECDSA          : on
                                            EVAPI          : off
                                            FILTER_AAAA    : off
                                            GOST           : on
                                            HIREDIS        : off
                                            LIBEVENT       : on
                                            MUNIN_PLUGIN   : off
                                            PYTHON         : on
                                            SUBNET         : off
                                            TFOCL          : off
                                            TFOSE          : off
                                            THREADS        : on
                                    Shared Libs required:
                                            libexpat.so.1
                                            libnghttp2.so.14
                                            libpython3.7m.so.1.0
                                            libevent-2.1.so.7
                                    Shared Libs provided:
                                            libunbound.so.8
                                    Annotations    :
                                            FreeBSD_version: 1202504
                                            cpe            : cpe:2.3:a:nlnetlabs:unbound:1.13.1:::::freebsd12:x64
                                            repo_type      : binary
                                            repository     : pfSense
                                    Flat size      : 7.79MiB
                                    

                                    Tried all recommendations on this post but nothing is working so far.

                                    1 Reply Last reply Reply Quote 1
                                    • J
                                      JasonAU
                                      last edited by

                                      Eagerly following any threads about DNS, My watch dog is restarting Unbound all the time.

                                      2.5.1-RELEASE (amd64)
                                      pfBlockerNG-devel: 3.0.0_16
                                      snort: 4.1.3_5
                                      Telegraf: 0.9_5

                                      Just wanted to share what see just on the off chance it helps the group, I did notice the already in use error in my system logs, when the watch dog is trying to start it back up

                                      Apr 23 10:15:04 pfsense php[92161]: servicewatchdog_cron.php: The command '/usr/local/sbin/unbound -c /var/unbound/unbound.conf' returned exit code '1', the output was '[1619136904] unbound[68018:0] debug: creating udp4 socket 192.168.1.1 53 [1619136904] unbound[68018:0] error: bind: address already in use [1619136904] unbound[68018:0] fatal error: could not open ports'
                                      Apr 23 10:15:04 pfsense php[73303]: notify_monitor.php: Message sent to XXXXX@hotmail.com OK
                                      Apr 23 10:15:01 pfsense php[92161]: servicewatchdog_cron.php: Service Watchdog detected service unbound stopped. Restarting unbound (DNS Resolver)
                                      

                                      Brisbane Queensland Australia

                                      GertjanG 1 Reply Last reply Reply Quote 0
                                      • C
                                        collinatselect
                                        last edited by

                                        Hi, so this is a documented upstream bug.
                                        https://redmine.pfsense.org/issues/11316
                                        I just found out about it because I submitted a trouble ticket.
                                        Unfortunately, until this regression is fixed, the solution is either

                                        1. Turn of Register "DHCP leases in DNS"
                                        2. Downgrade to 2.4.5
                                        3. Downgrade the package
                                        4. use the DNS forwarder

                                        Unfortunately 1) and 4) don't help if you need to Register DHCP in DNS in your organization.

                                        So here's hoping the developers on unbound have an easy fix.

                                        N 1 Reply Last reply Reply Quote 0
                                        • N
                                          netblues @collinatselect
                                          last edited by

                                          Service watchdog and unbound don't play well together.
                                          Especially if pfblockerng is also used (since it does take time to come up)
                                          In various situations, it ends up in unbound restart loops.

                                          By enabling unbound python mode, and disabling dhcp integration, unbound is stable.
                                          However, if wan ip changes due to pppoe restarting, unbound will die.
                                          Always.
                                          And since service watchdog is a no go for unbound, it has to be restarted manually
                                          Yikes!.
                                          At the time of ppp restart I get this
                                          Apr 19 11:18:24 unbound 19913 [19913:0] info: service stopped (unbound 1.13.1).
                                          2.5.1 pfblockerngng 3.0.16

                                          bingo600B J 2 Replies Last reply Reply Quote 1
                                          • bingo600B
                                            bingo600 @netblues
                                            last edited by

                                            @netblues

                                            I'm using unbound & service watchdog , and have no isues.
                                            Not using pfblocker though.

                                            If you find my answer useful - Please give the post a šŸ‘ - "thumbs up"

                                            pfSense+ 23.05.1 (ZFS)

                                            QOTOM-Q355G4 Quad Lan.
                                            CPUĀ  : Core i5 5250U, Ram : 8GB Kingston DDR3LV 1600
                                            LANĀ  : 4 x Intel 211, DiskĀ  : 240G SAMSUNG MZ7L3240HCHQ SSD

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