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

    Force port 53/853 to local pfSense DNS resovler

    Scheduled Pinned Locked Moved DHCP and DNS
    13 Posts 4 Posters 2.9k 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.
    • AndyRHA
      AndyRH
      last edited by

      I did something similar using PiHole as the DNS servers. It works well and silently forces hard coded systems (Roku) to use my DNS. I posted the instructions to use PiHole.

      https://forum.netgate.com/topic/156453/pfsense-dns-redirect-to-local-dns-server?_=1627566532678

      o||||o
      7100-1u

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

        Redirecting normal dns on 53 is quite simple.. But trying to redirect dot (dns using tls over port 853) is not.. Because the client should validate the cert is for the fqdn of the dot server wanting to talk to, and that its a trusted cert.

        This is not going to be the case with redirection of this traffic your local dns. While mitm is possible with dot, its more involved than simple redirection.

        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

        R 1 Reply Last reply Reply Quote 0
        • R
          rtfmoz @viragomann
          last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • R
            rtfmoz @viragomann
            last edited by

            @viragomann said in Force port 53/853 to local pfSense DNS resovler:

            @rtfmoz
            Don't see the sense of the rule for DNS exclusions sources, since the translation is the same as for any source.

            Rules 3 and 4 have switch0 as the source and the DNS server is on the same LAN=switch0, so I dont want to create a port forward loop.

            1 Reply Last reply Reply Quote 0
            • R
              rtfmoz @johnpoz
              last edited by rtfmoz

              @johnpoz said in Force port 53/853 to local pfSense DNS resovler:

              Redirecting normal dns on 53 is quite simple.. But trying to redirect dot (dns using tls over port 853) is not.. Because the client should validate the cert is for the fqdn of the dot server wanting to talk to, and that its a trusted cert.

              This is not going to be the case with redirection of this traffic your local dns. While mitm is possible with dot, its more involved than simple redirection.

              Yes I understand the problem is I need to read the DNS packet to determine that and I cannot open up a TLS connection. So all I have left is the IP address. This means I need to add the anycast IP of the root servers to a group and exclude them from the redirection. Would that solve the issue you think?

              1d3973e0-cfb1-4db8-a7b2-027acaca9b1a-image.png

              R 1 Reply Last reply Reply Quote 0
              • R
                rtfmoz @rtfmoz
                last edited by rtfmoz

                Oh wait... when you say dot, do you mean "." or are you are referring to dns over tls?

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

                  what I mean by dot is (dns over tls) if you think you can just redirect that.. You need to do a bit more research on what that is that is for sure..

                  Redirecting port 853 dns is not really a thing.

                  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

                  R johnpozJ 2 Replies Last reply Reply Quote 0
                  • R
                    rtfmoz @johnpoz
                    last edited by rtfmoz

                    This post is deleted!
                    1 Reply Last reply Reply Quote 0
                    • johnpozJ
                      johnpoz LAYER 8 Global Moderator @johnpoz
                      last edited by johnpoz

                      You would go about it by setting whatever the fqdn the client is trying to use to point to the IP of the dns that is hosting the dot dns.. Or by redirecting an IP it has hard coded to your IP, etc.

                      Now if you have a cert with that cn, or san that matches that fqdn, and the client will trust the CA you created that cert from - there you go mitm.

                      Depending on the client you might not be able to edit what CAs it trusts - so it could prove to be almost impossible, etc.

                      If you have all that understanding of how TLS works, why would you think you could just redirect dot then?

                      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

                      R 1 Reply Last reply Reply Quote 0
                      • R
                        rtfmoz @johnpoz
                        last edited by

                        I initially thought you were just referring the root domain server list aka “.” so I just didn’t redirect them. When it comes to SSL certs validation rules always apply.

                        But if you saying the CN is not tied to the domain of the DNS lookup then mitm is no problem with a trusted CA deployment. I just got that impression from what you said above

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