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

    Help pls - DNS leaks with vpn tunnel.

    Scheduled Pinned Locked Moved DHCP and DNS
    5 Posts 3 Posters 705 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.
    • P
      prairiesailor
      last edited by

      Howdy,

      I'm really new to pfSense, and just got a config going recently with policy based routing for certain hosts to go out my OpenVPN tunnel. That's working, however I have DNS leaks (showing my ISP DNS).

      In "general setup" I've entered my VPN company DNS servers.

      My clients currently have the firewall LAN IP as their DNS server. I'm afraid I'm struggling to understand where to start looking. There are many settings in the DNS Resolver config, so I'm not sure what I might have wrong or missing.

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

        Hi,

        So this is an "VPN question", not a DNS one : your DNS is working.

        @prairiesailor said in Help pls - DNS leaks with vpn tunnel.:

        In "general setup" I've entered my VPN company DNS servers.

        Maybe .... but these aren't used.
        You use the Resolver, that questions the root Internet DNS servers.
        If you want to use the DNS servers you supplied on "General settings", you should use the DNS Forwarder.

        The Resolver doesn't use your ISP DNS servers : where did they came from ? How dit you setup your WAN / other general settings ?

        In the OpenVPN forum you will find many threads talking about leaking DNS. If often boils down to "not knowing what DNS is and how it workd" with a nice touch "not using the default settings so things go bad".

        Your pfSense is set up as a OpenVPN client, and you connect to an OpenVPN service ?

        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
        • P
          prairiesailor @Gertjan
          last edited by

          @gertjan said in Help pls - DNS leaks with vpn tunnel.:

          Hi,

          So this is an "VPN question", not a DNS one : your DNS is working.

          @prairiesailor said in Help pls - DNS leaks with vpn tunnel.:

          In "general setup" I've entered my VPN company DNS servers.

          Maybe .... but these aren't used.
          You use the Resolver, that questions the root Internet DNS servers.
          If you want to use the DNS servers you supplied on "General settings", you should use the DNS Forwarder.

          The Resolver doesn't use your ISP DNS servers : where did they came from ? How dit you setup your WAN / other general settings ?

          In the OpenVPN forum you will find many threads talking about leaking DNS. If often boils down to "not knowing what DNS is and how it workd" with a nice touch "not using the default settings so things go bad".

          Your pfSense is set up as a OpenVPN client, and you connect to an OpenVPN service ?

          My WAN connection is using just DHCP, so I assume the DNS servers are being handed out via DHCP from the ISP.

          My firewall is setup with a single WAN connection, and an OpenVPN tunnel. I have setup a firewall rule to take traffic from certain hosts and use the tunnel as the gateway for those hosts.

          We all have to learn sometime don't we. I wouldn't say things "have gone bad". I'm quite happy that everything is going quite well, and that the OpenVPN is working, along with my source-based rule. Only one thing not working...that's the DNS leak.

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

            @prairiesailor said in Help pls - DNS leaks with vpn tunnel.:

            so I assume the DNS servers are being handed out via DHCP from the ISP.

            Most likely yes your ISP would hand out dns via dhcp.. But out of the box pfsense doesn't use those - it resolves via unbound..

            So either just forward to your vpn dns, or resolve through the vpn connection by changing unbound to use your vpn connection for its outbound queries..

            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.7.2, 24.11

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

              @johnpoz said in Help pls - DNS leaks with vpn tunnel.:

              So either just forward to your vpn dns, or resolve through the vpn connection by changing unbound to use your vpn connection for its outbound q

              Exact.
              But keep in mind / check this : if unbound starts before the openvpn tunnel, what will happen ?

              Also : keep in mind that if you use the Forwarder, by default it will use all available interfaces to question DNS servers up stream. It should be limited to the OpenVPN tunnel interface.

              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
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.