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

Unbound not responding on all chosen interfaces after reboot

Scheduled Pinned Locked Moved DHCP and DNS
25 Posts 6 Posters 4.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.
  • R
    robotox
    last edited by Dec 10, 2022, 12:18 PM

    Hi,
    I seem to have a similar problem.
    In my case unbound is set to use Outgoing Interfaces that are VPNs.
    I guess unbound ignores them as they haven't come up yet during its start.
    I need to later restart the unbound service.
    I can't even find proof of that.
    But I've read about this behavior a couple of times.
    So I guess it is definitely not related with one user with specific setup.
    Thanks.

    G 1 Reply Last reply Dec 10, 2022, 12:50 PM Reply Quote 0
    • G
      Gertjan @robotox
      last edited by Dec 10, 2022, 12:50 PM

      @robotox

      With unbound set to listen to "All" interfaces, it will (I should say : should) listen on all available interfaces when the system boots and unbound starts.

      Also : when using a OpenVPN client, see here https://www.youtube.com/watch?v=ulRgecz0UsQ at 9 minutes and 28 seconds : an 'OpenVPN' interface has to be created so the system and unbound has another interface.
      In theory, as I didn't test this, I'm not using any OpenVPN client, when the OpenVPN clients start, and 'interface' event will happens : unbound gets restarted and now it will find the OpenVPN interface and 'bind' (use) to it. Did you saw such an event ?

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

      R 2 Replies Last reply Dec 10, 2022, 1:05 PM Reply Quote 0
      • R
        robotox @Gertjan
        last edited by Dec 10, 2022, 1:05 PM

        @gertjan said in Unbound not responding on all chosen interfaces after reboot:

        unbound gets restarted and now it will find the OpenVPN interface and 'bind' (use) to it. Did you saw such an event ?

        Thank for your time.
        I don't use "All" interfaces so that all DNS queries are routed to the VPNs (I have at the moment a total of 3 to test redundancy) for privacy reasons. It is said that this is the only way to prevent DNS leaks to the actual ISP at WAN.
        Unbound doesn't seem to restart at all after initial boot for any reason. Watchdog not helpful in this case as the service is really running.
        I just increased log level from 3 to 5 but I don't think it will show me any new information for what I am looking for.
        Will shutdown and boot again to have a new look at it.
        Thanks again.

        D 1 Reply Last reply Dec 10, 2022, 4:10 PM Reply Quote 0
        • R
          robotox @Gertjan
          last edited by robotox Dec 10, 2022, 2:09 PM Dec 10, 2022, 2:09 PM

          @gertjan
          Tried removing the physical WAN cable and it brings unbound to apparently resolve itself.

          Tried removing all VPNs but leaving only 1.
          Unbound starts 2 seconds before every interface and does nothing after that.

          Thank you once more.

          1 Reply Last reply Reply Quote 0
          • D
            DBMandrake @robotox
            last edited by DBMandrake Dec 10, 2022, 4:13 PM Dec 10, 2022, 4:10 PM

            @robotox said in Unbound not responding on all chosen interfaces after reboot:

            @gertjan said in Unbound not responding on all chosen interfaces after reboot:

            unbound gets restarted and now it will find the OpenVPN interface and 'bind' (use) to it. Did you saw such an event ?

            Thank for your time.
            I don't use "All" interfaces so that all DNS queries are routed to the VPNs (I have at the moment a total of 3 to test redundancy) for privacy reasons. It is said that this is the only way to prevent DNS leaks to the actual ISP at WAN.

            Why not just enable forwarder mode in the unbound configuration and tell it to forward to a DNS server on the other end of your VPN ? (Presumably head office) That way it will not try to query root servers.

            Also you could use egress rules in floating rules to block outgoing queries on the WAN interface so that even if unbound tried to send dns queries outside your VPN's they would be blocked.

            Because unbound runs on the firewall itself only egress rules can block its query traffic.

            R S 2 Replies Last reply Dec 10, 2022, 4:36 PM Reply Quote 0
            • R
              robotox @DBMandrake
              last edited by Dec 10, 2022, 4:36 PM

              @dbmandrake
              Hi, unbound is in forwarding mode with selected Outgoing Interfaces -- not "All".
              Tried with or without declaring the VPN provider's DNSs.
              Floating rules are set up to prevent leaks to WAN.
              As far as I understood, those would apply to the client devices only -- the firewall's setup for Unbound is managed separately.
              As far as I understood, to achieve the desired solution I need to unselect "All" and select only those desired interfaces.
              Thanks.

              1 Reply Last reply Reply Quote 0
              • S
                skogs @DBMandrake
                last edited by Dec 20, 2022, 4:01 AM

                @dbmandrake
                This is potentially wildly off topic; but are we attempting to spoof MACs?
                I could potentially see it initially come up with real MAC; then swap to fake MAC and bork things.

                1 Reply Last reply Reply Quote 0
                • R
                  robotox
                  last edited by Jan 17, 2023, 10:37 PM

                  Added my plea here https://redmine.pfsense.org/issues/13707.

                  1 Reply Last reply Reply Quote 0
                  • T
                    tomeq82
                    last edited by Apr 1, 2023, 10:56 AM

                    I'm with that problem too. I'm using pfsense+ 23.01 but it happened on 2.6 too. My setup is a virtual pfSense running on qemu (Linux) with explictly passed through intel dual port 1 Gig adapter to the pfSense so it works as bare-metal NIC.

                    Each and every reboot of pfSense guest, machine reboot, renders Unbound unusable - it starts but it doesn't resolve a thing. Only restart of the service helps immediately.

                    My setup is similar to those described in the other places - listen on LAN, localhost, outgoing interface WAN. I tried various workarounds for this eg. setting gateway monitoring address to something few hops further than default ISP gw - like 1.1.1.1 but no avail... the issue persist.

                    1 Reply Last reply Reply Quote 1
                    • R
                      robotox
                      last edited by Sep 5, 2023, 7:45 AM

                      Hi,
                      I now have an SG-2100 with 23.05.1 for the same setup and still the same problem.
                      Unbound fails to start as I have OpenVPNs as Outgoing Network Interfaces.
                      Still trying to get attention at https://redmine.pfsense.org/issues/13707.

                      D 1 Reply Last reply Sep 8, 2023, 9:21 AM Reply Quote 0
                      • D
                        DBMandrake @robotox
                        last edited by DBMandrake Sep 8, 2023, 9:24 AM Sep 8, 2023, 9:21 AM

                        While it's technically only a workaround and I would hope this will get fixed one day, the pragmatic solution is to just set "Network Interfaces" and "Outgoing Network Interfaces" to All, and simply use firewall rules to block / allow access to the DNS server from client devices.

                        That way, no matter how interfaces go up or down during boot or later on (including VPN's going up and down after the system has booted) unbound will always bind to all interfaces, but access will be dictated by the firewall rules for each interface.

                        This is how I have been running ever since reporting the issue, and in some ways blocking using firewall rules is a more explicit and secure way to prevent access to the DNS server for clients who should not have access than relying on unbound to bind to the correct interfaces in its own configuration.

                        Given the default firewall rules for an interface are to block, this is fairly easy because unless you add an allow rule access to the DNS server is blocked by default including attempts to query from the WAN side.

                        G 1 Reply Last reply Sep 8, 2023, 9:27 AM Reply Quote 0
                        • G
                          Gertjan @DBMandrake
                          last edited by Sep 8, 2023, 9:27 AM

                          @DBMandrake

                          Consider also using Unbound ACL rules.

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

                          D 1 Reply Last reply Sep 8, 2023, 9:39 AM Reply Quote 0
                          • D
                            DBMandrake @Gertjan
                            last edited by DBMandrake Sep 8, 2023, 9:40 AM Sep 8, 2023, 9:39 AM

                            @Gertjan Much less secure, because unbound still receives and processes the packets and then decides whether they should be ignored or responded to based on its own configuration file.

                            If there was ever a problem like a buffer overflow found in unbound it would be vulnerable to attack from clients that are "blocked" by the ACL list but allowed by firewall rules.

                            Firewall rules on the other hand are absolute, and do not allow any packets to reach unbound for processing and would prevent such exploitation. So if you're going to bind to all interfaces (as in this workaround) why not just set access to unbound using firewall rules. I would not rely on unbounds own ACL's except to allow remote subnets which are normally denied by default. I would not rely on it as a means of blocking.

                            G 1 Reply Last reply Sep 8, 2023, 11:01 AM Reply Quote 1
                            • G
                              Gertjan @DBMandrake
                              last edited by Sep 8, 2023, 11:01 AM

                              @DBMandrake

                              Now that's what I call 'considering' 👍

                              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
                              • R
                                robotox
                                last edited by Sep 8, 2023, 9:03 PM

                                Thank you for bringing the thread back to life!
                                But in my case, the problem being with Outgoing Interfaces, rules won't apply to the firewall.

                                1 Reply Last reply Reply Quote 0
                                • R
                                  robotox
                                  last edited by Sep 10, 2023, 5:30 PM

                                  Now testing the SG-2100 with 23.05.1 for the similar setup but with multiple Wireguards instead of multiple OpenVPNs.
                                  Unbound starts correctly.
                                  I am guessing that Wireguard is faster than OpenVPN starting at boot.
                                  Thanks again.

                                  1 Reply Last reply Reply Quote 0
                                  • First post
                                    Last post
                                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                                    This community forum collects and processes your personal information.
                                    consent.not_received