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

    DNS over VPN, but DNS needed to dial VPN

    Scheduled Pinned Locked Moved OpenVPN
    4 Posts 3 Posters 581 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.
    • B
      bedub1
      last edited by

      I'm in a Catch 22 here.  I'm running OpenVPN in Client mode.  My firewall rules route HTTP(s) and DNS traffic over the VPN tunnel.  My VPN is setup to dial based upon a DNS entry.  The problem is, when everything starts from fresh, pfSense tries to resolve the DNS name in order to dial the VPN tunnel, but this lookup fails because the VPN tunnel isn't established.

      Is there any way to let pfSense itself connect directly to the internet for DNS, but send all other queries through the VPN tunnel?

      1 Reply Last reply Reply Quote 0
      • JKnottJ
        JKnott
        last edited by

        In my experience, when traffic, including DNS, is forced through the tunnel, that only happens when the tunnel is up.  There's no reason to block outgoing DNS requests.  Failing that, does the OpenVPN server have a static address?  If so, then you can use that, instead of a host name, when setting up the tunnel.

        PfSense running on Qotom mini PC
        i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
        UniFi AC-Lite access point

        I haven't lost my mind. It's around here...somewhere...

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

          Hmm….  Disabling the Service and tearing down the tunnel, the traffic still flows fine.  I've re-enabled my DNS rule.  I'll see what happens.

          1 Reply Last reply Reply Quote 0
          • T
            TheNarc
            last edited by

            I have worked around this situation by just using the VPN server's IP address instead of its hostname in the VPN client config.

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