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

    Default unbound DNS-over-TLS - Potential MITM Issue By Not Verifying Certificate?

    Scheduled Pinned Locked Moved DHCP and DNS
    4 Posts 2 Posters 837 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.
    • F
      Finger79
      last edited by Finger79

      I was reading up on unbound on another blog and wanted to see pfSense's current implementation. I'm currently using DoT to 1.1.1.1 and 1.0.0.1 successfully.

      Looking at the unbound config file:

      /var/unbound/unbound.conf

      Here's how pfSense configures the forward zone:

      # Forwarding
      forward-zone:
      	name: "."
      	forward-tls-upstream: yes
      	forward-addr: 1.1.1.1@853
      	forward-addr: 1.0.0.1@853
      

      Here's what I'd like to see:

      # Forwarding
      forward-zone:
      	name: "."
      	forward-tls-upstream: yes
      	forward-addr: 1.1.1.1@853#cloudflare-dns.com
      	forward-addr: 1.0.0.1@853#cloudflare-dns.com
      

      And for those using Quad9:

      	forward-addr: 9.9.9.9@853#dns.quad9.net
      

      The article states that the "#" is not actually a comment but specifies the CN for unbound to verify with the upstream DoT server. Without specifying "#cloudflare-dns.com", for example, it potentially opens up a MITM scenario that allows self-signed certificates from an attacker.

      It would be nice if there was a way for us to specify in the WebUI (maybe in General Setup where we specify the DNS servers?) the FQDN/CN of the DNS-over-TLS certificate that applies for each entry, which then gets added to unbound.conf.

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

        @finger79 said in Default unbound DNS-over-TLS - Potential MITM Issue By Not Verifying Certificate?:

        It would be nice if there was a way for us to specify in the WebUI (maybe in General Setup where we specify the DNS servers?) the FQDN/CN of the DNS-over-TLS certificate that applies for each entry, which then gets added to unbound.conf.

        Heck, it may be easier to completely separate the System DNS (in General Setup) with the unbound settings. In other words, keep the System DNS UI in General Setup as-is, but instead of unbound pulling from General Setup, have separate text fields that only unbound uses (Servces --> Resolver). This has the added benefit of easier UX since I've seen many users (myself included) confuse the DNS entries that pfSense itself uses on localhost vs. what unbound uses.

        1 Reply Last reply Reply Quote 0
        • jimpJ
          jimp Rebel Alliance Developer Netgate
          last edited by

          Yes, there is a potential for MITM, but Unbound could not validate hosts at first due to the OpenSSL version used on pfSense. They recently put out an updated version that can, though their fix was incomplete so we had to submit a patch to fix that.

          Read through all the history here: https://redmine.pfsense.org/issues/8602

          tl;dr: It will be possible on pfSense 2.5.0, and maybe on 2.4.x if we have to make another release there.

          Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

          Need help fast? Netgate Global Support!

          Do not Chat/PM for help!

          1 Reply Last reply Reply Quote 2
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            Meant to tack this onto my earlier reply. Here is a screenshot of how you set the hostname for DNS over TLS verification on 2.5.0:

            0_1551890734639_8d796ab0-fe07-4f0f-babf-d0830b2e2069-image.png

            Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

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