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

    How to enforce encryption of outbound DNS queries

    Scheduled Pinned Locked Moved DHCP and DNS
    13 Posts 4 Posters 696 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.
    • V
      viragomann @Jung-Fernmelder
      last edited by

      @Jung-Fernmelder said in How to enforce encryption of outbound DNS queries:

      I tought of blocking port 53 generally but it would have side effects - clients which are depending on unencrypted DNS services wouldn't be able to perform DNS lookups.

      Why do the clients need to request public DNS servers directly?
      The should request the DNS resolver on pfSense instead, which allows unencrypted connections.

      So there is no need to allow any unencrypted outbound DNS traffic.

      J 1 Reply Last reply Reply Quote 0
      • E
        elvisimprsntr
        last edited by elvisimprsntr

        This is what I do. End result is all unencrypted outbound DNS queries will be redirected to the local DNS server, which will encrypt all outbound queries. I ran a packet capture to confirm there are no WAN side outbound unencrypted DNS queries.

        1. DNS Resolver settings

        Screenshot 2024-09-03 at 5.51.36 AM.png

        Screenshot 2024-09-03 at 5.52.22 AM.png

        1. Add a NAT rule to redirect all unencrypted outbound DNS queries to the local DNS server, just in case some clients hard code their DNS servers.

        Screenshot 2024-09-03 at 5.53.23 AM.png

        1 Reply Last reply Reply Quote 0
        • V viragomann referenced this topic on
        • J
          Jung-Fernmelder @viragomann
          last edited by

          @viragomann said in How to enforce encryption of outbound DNS queries:

          Why do the clients need to request public DNS servers directly?

          @elvisimprsntr said in How to enforce encryption of outbound DNS queries:

          just in case some clients hard code their DNS servers

          @elvisimprsntr Why did you enable DNSSEC support? There are a lot of warnings that DNSSEC support would can cause issues with DoT. And it's unencrypted since DNSSEC verifies the DNS server's identitiy only.

          V E 2 Replies Last reply Reply Quote 0
          • V
            viragomann @Jung-Fernmelder
            last edited by

            @Jung-Fernmelder
            Also I'd ponder, if you really need to enable TLS on the resolver. Do you need internal DNS to be encrypted?
            DoT on local clients will further take some more configuration steps.

            J 1 Reply Last reply Reply Quote 0
            • J
              Jung-Fernmelder @viragomann
              last edited by

              @viragomann said in How to enforce encryption of outbound DNS queries:

              Do you need internal DNS to be encrypted?

              I want to prevent the clients connected to the pfSense from spying out each other. Without internal DNS encryption the clients can use wireshark (or comparable tools) to investigate who has looked up which domain when. They would also be able to perfom man in the middle attacks. With internal DNS encryption they could only see who has looked up how many domains in a certain period of time.

              @viragomann said in How to enforce encryption of outbound DNS queries:

              DoT on local clients will further take some more configuration steps.

              No problem. The critical clients have to be configured to use DoT, no operating system uses DoT by default I think.

              GertjanG 1 Reply Last reply Reply Quote 0
              • E
                elvisimprsntr @Jung-Fernmelder
                last edited by elvisimprsntr

                @Jung-Fernmelder said in How to enforce encryption of outbound DNS queries:

                @elvisimprsntr Why did you enable DNSSEC support? There are a lot of warnings that DNSSEC support would can cause issues with DoT. And it's unencrypted since DNSSEC verifies the DNS server's identitiy only.

                I’ve not had any issues.

                bb631b91-7b89-414b-ae74-78ebe5ae6f18-image.jpeg

                1 Reply Last reply Reply Quote 0
                • GertjanG
                  Gertjan @Jung-Fernmelder
                  last edited by

                  @Jung-Fernmelder said in How to enforce encryption of outbound DNS queries:

                  Without internal DNS encryption the clients can use wireshark (or comparable tools) to investigate who has looked up which domain when.

                  WPA2 can be decrypted on the fly these days ?

                  But ok, one of my SSIDs is not encrypted at all, as I use that wifi network with the captive portal.
                  Portal authentication is done over TLS (so good luck with that).
                  Most (if not all) web access, mail access and everything else is done over TLS, but, correct, DNS is still open in the air.
                  So, in theory, I can see, and many with me, that my hotel clients visit :
                  Facebook, Google, Netflix, Youtube, twitter, Toctoc and so on. What they are doing there, I can't tell.
                  Be ware : portal users, or wifi users that have things to hide (they are the first to know ;) ) will, right after portal activation, fire up their VPN .... so even if with a Wifi network open, all traffic is still hidden.

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

                  J 1 Reply Last reply Reply Quote 1
                  • J
                    Jung-Fernmelder @Gertjan
                    last edited by

                    @Gertjan The security of WPA2 doesn't matter since the critical clients are connected by wire. But somebody could clamp the wire and sniff out the traffic. Therefore every kind of unencrypted traffic has to be avoided.

                    E GertjanG 2 Replies Last reply Reply Quote 0
                    • E
                      elvisimprsntr @Jung-Fernmelder
                      last edited by

                      @Jung-Fernmelder

                      There is a thing called IP isolation to prevent clients from seeing each other or other parts of a network.

                      1 Reply Last reply Reply Quote 0
                      • GertjanG
                        Gertjan @Jung-Fernmelder
                        last edited by

                        @Jung-Fernmelder said in How to enforce encryption of outbound DNS queries:

                        But somebody could clamp the wire and sniff out the traffic

                        Clamp a wire, like we did with the phone lines, ages ago ?
                        Way to complicated. We're in 2024 now. All my switches are L2/L3. So I can port clone any port at 'my command', and see whats on it.
                        It's still have that one on the "should do that ones before I go 8 feet under" list.

                        Anyway, You will discover that people are going 'somewhere'. Again, not what they are doing.

                        Maybe it's age .... I'm not sure when, but I've lost that "wana see what are other do with their devices/conenction" feeling some decades ago. I just try to understand what I do with my own stuff ... and that's already hard enough.

                        Btw, devices like switches, routers etc aren't user accessible, right ?

                        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
                        • E
                          elvisimprsntr
                          last edited by elvisimprsntr

                          Seems like this thread has gotten off topic. Started with how to make sure all outbound DNS queries are encrypted, which I think we provided a solution.

                          Client isolation is a completely different subject altogether. Suggest OP open a new thread.

                          J 1 Reply Last reply Reply Quote 0
                          • J
                            Jung-Fernmelder @elvisimprsntr
                            last edited by

                            @elvisimprsntr said in How to enforce encryption of outbound DNS queries:

                            Seems like this thread has gotten off topic. Started with how to make sure all outbound DNS queries are encrypted, which I think we provided a solution.

                            I've implemented the provided suggestion. Even I didn't run extensive tests and long-period packet captures in order to ensure that there's absolutely no unencrypted outbound DNS traffic, I highly suspect that it works. It's okay for now. The internal DNS traffic between the cleints and the pfSense is unencrypted because I didn't manage to configure the clients to use pfSense's capability to process encrypted inbound DNS queries.

                            @elvisimprsntr said in How to enforce encryption of outbound DNS queries:

                            Client isolation is a completely different subject altogether. Suggest OP open a new thread.

                            Yes. I will try to get into client isolation and roll it out at a rainy afternoon. I guess it will be a challenge because I will have to avoid side effects (some clients have to be able to communicate with each other, in example a computer which has to transfer a print order to the printer or a file to the NAS).

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