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

    How to get rid of the DNSResolver public DNS connection attempts?

    Scheduled Pinned Locked Moved DHCP and DNS
    4 Posts 3 Posters 830 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.
    • G
      G.C.S
      last edited by

      In my Lab, Pfsense VMs do not have internet access.

      When starting pfsense VMs these hang for a minute at the DNSResolver trying to reach public DNS servers, I see this in my upstream firewall....

      Deny <pfSensePublicIp> 192.112.36.4 dns/udp
      Deny <pfSensePublicIp> 192.58.128.30 dns/udp
      Deny <pfSensePublicIp> 199.7.91.13 dns/udp
      Deny <pfSensePublicIp> 192.33.4.12 dns/udp
      Deny <pfSensePublicIp> 199.7.83.42 dns/udp
      Deny <pfSensePublicIp> 192.5.5.241 dns/udp
      Deny <pfSensePublicIp> 199.9.14.201 dns/udp
      Deny <pfSensePublicIp> 202.12.27.33 dns/udp
      Deny <pfSensePublicIp> 198.97.190.53 dns/udp
      Deny <pfSensePublicIp> 193.0.14.129 dns/udp
      Deny <pfSensePublicIp> 192.36.148.17 dns/udp
      Deny <pfSensePublicIp> 198.41.0.4 dns/udp
      ...

      I have tried to turn on 'Forwarding Mode'...

      Services > DNS Resolver > DNS Query Forwarding

      Enable Forwarding Mode

      ...but this does not solve the startup issue.

      So where can I disable the DNSResolver connection attempts at startup?

      johnpozJ 1 Reply Last reply Reply Quote 0
      • johnpozJ
        johnpoz LAYER 8 Global Moderator @G.C.S
        last edited by johnpoz

        @g-c-s This would most likely be unbound updating the anchor...

        You could prob edit the inc file... looks like @Gertjan goes over a method of stopping that.

        https://forum.netgate.com/topic/162435/unbound-service-very-slow-to-start-in-offline-setup

        I have seen other threads on other boards on getting unbound from talking to roots on startup by disable the anchor service, etc.

        If your in forwarding mode, and since wouldn't be doing any dnssec in this mode.. Might be possible to put in an option in the gui for unbound to not bother updating or trying to update when in forwarding mode... But yeah on startup of unbound it would try talking to roots.. That is what Gertjan edits of the inc file is doing, stopping anchor from running.. But those would revert on any sort of update of pfsense, etc.

        Might be a good feature request for users just wanting to use unbound in forwarding mode.

        What you could do maybe is simple hack and just delete the /usr/local/sbin/unbound-anchor file this is what is called.. If that file is not there don't see how it would talk to roots on startup. But not sure what sort of delays or log entries that might cause.. But that might be a dirty simple "hack" to stop it from talking to roots. Caveat emptor would be in order here if doing either the edits in that thread or just deleting that file..

        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

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

          @johnpoz said in How to get rid of the DNSResolver public DNS connection attempts?:

          just delete the /usr/local/sbin/unbound-anchor file

          Euh ... rename it for easy retrieval ?!

          Also : it wouldn't surprise me that unbound primes all the root servers ( 192.112.36.4 ....; 198.41.0.4 are the root servers) to find out upfront the fastest.

          If a forwarder is needed : switch to the forwarder - tat is not not unbound running as a forwarder, but dnsmasq. This one : Services > DNS Forwarder
          Unbound is a resolver, it needs upstream root servers to work. if not, just don't run/us it.

          Also : don't forget that using the GUI kicks of some requests that go outside : the OS and package update checking software for example. This has also to be stopped, if possible. As these kick of DNS requests.

          So :

          @g-c-s said in How to get rid of the DNSResolver public DNS connection attempts?:

          So where can I disable the DNSResolver connection attempts at startup?

          a) handle the DNSSEC anchor file - see also the other thread.
          b) enable DNS detailed query logging, and look what domain is been asked to resolve : this will reveal the source of the request => "disable it".

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

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

            @gertjan said in How to get rid of the DNSResolver public DNS connection attempts?:

            Euh ... rename it for easy retrieval ?!

            Yeah much better suggestion ;) hehehe - its early here and only on first cup of coffee at the time is my only excuse - hehehe

            As these kick of DNS requests.

            I don't think he is too worried about any requests, I take it he only concerned with the queries to the roots.. If setup in forwarding mode only then pfsense requests should only go to the setup forwarding server(s)..

            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
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.