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

    DNS leak

    Scheduled Pinned Locked Moved General pfSense Questions
    23 Posts 10 Posters 4.6k 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.
    • emammadovE
      emammadov
      last edited by emammadov

      Hello,

      I tested DNS Leak test on www.dnsleaktest.com and noticed that we have DNS leak. I saw that many people complain about it.

      Elvin

      Cool_CoronaC L 2 Replies Last reply Reply Quote 0
      • Cool_CoronaC
        Cool_Corona @emammadov
        last edited by

        @emammadov said in DNS leak:

        Hello,

        After upgrading to pfsense 2.4.5 p1, I tested DNS Leak test on www.dnsleaktest.com and noticed that we have DNS leak. Is this bug in 2.4.5 p1 release? I saw that many people complain about it after upgrade to 2.4.5 p1.

        In System->General do NOT specify any DNS servers.

        Test again.

        emammadovE 1 Reply Last reply Reply Quote 0
        • emammadovE
          emammadov @Cool_Corona
          last edited by emammadov

          @Cool_Corona I receive ip address as static ip from ISP, not dhcp, that's why I have mentioned dns servers. If I remove them, I will lose internet connectivity.

          Elvin

          Cool_CoronaC GertjanG 2 Replies Last reply Reply Quote 0
          • Cool_CoronaC
            Cool_Corona @emammadov
            last edited by

            @emammadov said in DNS leak:

            @Cool_Corona I receive ip address as static ip from ISP, not dhcp, that's why I have mentioned dns servers. If I remove them, I will lose internet connectivity.

            I have a static IP as well. Use Unbound and no servers stated will use DNS Root servers around the world as resolvers.

            1 Reply Last reply Reply Quote 0
            • emammadovE
              emammadov
              last edited by

              Is this a bug? If yes, hope it to be fixed in the next release.

              Elvin

              1 Reply Last reply Reply Quote 0
              • B
                bcruze
                last edited by

                I have a static IP address, latest pfsense and my test shows exactly what it should

                I am using the resolver for wan no forwarding

                Tunnels use the servers I have set to be used

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

                  @emammadov said in DNS leak:

                  If I remove them, I will lose internet connectivity.

                  You should fix that first.
                  pfSense uses the resolver, unbound. It has a build in list with the 13 main root servers.
                  It's like the DNS request chain is set up statically.
                  You have to set up an IP, and a gateway for WAN nothing more.

                  pfSense uses the default DHCP client for obtaining a WAN IP and gateway - it discards any DNS servers, if the upstream DHCP servers supplies them. This could be your up stream router, or an ISP router at the other end of the city.

                  @emammadov said in DNS leak:

                  Is this a bug?

                  What bug ?
                  An incomplete (?) setup of a VPN connection is a bug in the brain of the admin.
                  I admit being curious about you waiting to obtain a new release of ... yourself ???? I know, nightly builds exists, but still .... please explain.

                  Example :
                  Resolver settings :
                  4a2f8fcc-7bc8-4a13-beaa-1ae8bed60e5b-image.png

                  With this setting I gave unbound the possibility to use any (all) interface to connect to available DNS servers. It's knows that all these are on the outside (not local) thus it will choose de default route, or WAN in my case.
                  I should consider selecting OPENVPN as an outgoing interface, to force all DNS requests to take the VPN path.

                  Also :
                  System > Routing > Gateways : select the VPN type interface, not your WAN type interface.

                  ( examples are NOT exhaustive - variants exists )

                  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
                  • L
                    linuxlad @emammadov
                    last edited by

                    @emammadov Which version of pfsense are you running? I have the same issue with 2.4.5-RELEASE-p1 release. I had a working and tested setup of pfsense 2.4.4 (the last install that I remember). No config change after that, the only thing that I changed was the periodic updates. And today I noticed that the clients on the VPN subnet are leaking DNS. I have no way to revert to the earlier release to reproduce but looks like this is specific to 2.4.5-RELEASE-p1 as I tried various other recommended settings with no luck.

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

                      2.4.5-p1 of course.
                      Early versions shouldn't be used, mainly for security reasons.

                      Unbound, as a resolver, use whatever interface (outgoing) it can get it hands on, to obtain DNS answers.
                      This is normally the WAN interface. If you add another WAN type interface, like a connection to remote VPN server, then that will be another WAN interface.
                      Unbound should be restarted if such a VPN interface comes up. This happens typically later on during the boot process.
                      Firewall rues should enforce the behaviour that looks like this :
                      Use the classic WAN if it's the only one available.
                      Use a VPN WAN if that one is available.

                      Btw : take note : I only did some minor VPN experiences using pfSense as a VPN-client, using a (paid) remote VPN server. As such, never tried to understand what 'DNS leaks' means.

                      See (all !) the official VPN videos from Netgate on their Youtube channel.

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

                      P 1 Reply Last reply Reply Quote 0
                      • stephenw10S
                        stephenw10 Netgate Administrator
                        last edited by stephenw10

                        There isn't a known issue in 2.4.5 that would present like that.
                        How exactly do you have the clients configured?

                        Unfortunately there are a great number of people out there who have no idea what DNS leak tests actually do. That means the signal to noise ratio for reports like this is low inducing skepticism! 😉

                        Steve

                        L 1 Reply Last reply Reply Quote 1
                        • L
                          linuxlad @stephenw10
                          last edited by

                          @stephenw10 said in DNS leak:

                          Unfortunately there are a great number if people out there who have no idea what DNS leak tests actually do. That means the signal to noise ratio for reports like this low inducing skepticism!

                          I found the config issue on my side. Sorry for the Spam.

                          1 Reply Last reply Reply Quote 1
                          • stephenw10S
                            stephenw10 Netgate Administrator
                            last edited by

                            You'll have to try a lot harder to get classified as spam. 😉

                            There's a lot of misinformation out there.

                            1 Reply Last reply Reply Quote 0
                            • P
                              PowerSing Banned @Gertjan
                              last edited by

                              This post is deleted!
                              G 1 Reply Last reply Reply Quote 0
                              • G
                                gabacho4 Rebel Alliance @PowerSing
                                last edited by gabacho4

                                @PowerSing funny how both of the two posts you have ever made are about the FUD a "friend" has told you about pfsense.

                                @stephenw10 can we get this account banned for being a troll?

                                1 Reply Last reply Reply Quote 0
                                • stephenw10S
                                  stephenw10 Netgate Administrator
                                  last edited by

                                  We can certainly keep a close eye out!

                                  I agree that is just FUD.

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

                                    He is putting up names from linked in with another key word to boost their SEO rating.. Banned and posts deleted.

                                    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 1
                                    • AKEGECA
                                      AKEGEC
                                      last edited by

                                      @emammadov DNS leaks can happen because of your configuration, ISP and bugs.

                                      • Disconnected cable of your ISP on your Pfsense device.
                                      • Go to System > General Setup >  DNS server setting > DNS server > Enter 2 IP addresses from Quad9 DNS: 9.9.9.9 and 149.112.112.112 > Unchecked DNS Server Override > Save.
                                      • Go to Services > DNS Resolver : 
                                        √ Checked Enable DNS resolver box 
                                        Network Interfaces - ALL
                                        Outgoing Network Interfaces - ALL
                                        √Checked Enable Forwarding Mode box
                                        √Checked Use SSL/TSL for outgoing
                                        √Checked DHCP Registration
                                        √ Checked Static DHCP
                                        Save.
                                      • Reboot Pfsense, Diagnostics > Reboot and reconnect your ISP cable.
                                        
Hope this helps.
                                      1 Reply Last reply Reply Quote 1
                                      • stephenw10S
                                        stephenw10 Netgate Administrator
                                        last edited by

                                        So 'leaking' all of your queries to quad9 as opposed to resolving it yourself?

                                        It really depends what you're trying to achieve. If that's hiding DNS queries from your ISP that would do it. If the test is checking if clients are sending DNS over a VPN that would show as all leaked. 😉

                                        Steve

                                        AKEGECA 1 Reply Last reply Reply Quote 0
                                        • L
                                          linuxlad
                                          last edited by

                                          I feel really guilty for reviving this 3 months old thread. 😇

                                          1 Reply Last reply Reply Quote 0
                                          • AKEGECA
                                            AKEGEC @stephenw10
                                            last edited by

                                            @stephenw10 said in DNS leak:

                                            So 'leaking' all of your queries to quad9 as opposed to resolving it yourself?

                                            It really depends what you're trying to achieve. If that's hiding DNS queries from your ISP that would do it. If the test is checking if clients are sending DNS over a VPN that would show as all leaked. 😉

                                            Steve

                                            But Steve, it is still not quite right. A DNS leak is still a leak, that means ISP can still see visited hosts.
                                            Pfsense configurations need some tweaking. For those who use VPN provider with DNS leaks please follow these steps:

                                            • Go to Firewall > Wan > add new rule:
                                              Action: Block
                                              Interface: Wan
                                              Address Family: IPv4+IPv6
                                              Protocol: TCP/UDP
                                              Source: Any
                                              Destination: Any Port Range Custom: 53
                                              Save

                                            • Go to Firewall > Lan and/or Opt1 tab
                                              Action: Pass
                                              Interface: Lan and/or Opt1
                                              Address Family: IPv4
                                              Protocol: UDP
                                              Source: Lan net or Opt1 net
                                              Destination: any Port Range Custom: 53
                                              #Click button# Display Advance
                                              Gateway: Choose your VPN Interface
                                              Save

                                            • Go to Services > DHCP server > Lan and/or Opt1>Servers>DNS server (Quad9 DNS):
                                              9.9. 9.9
                                              149.112. 112.112
                                              2620:fe::fe
                                              2620:fe::fe:9
                                              Save

                                            Reboot your Pfsense and test it again for DNS leak https://ipleak.net
                                            
Hope this helps.

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