Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    • Register
    • Login
    Introducing Netgate Nexus: Multi-Instance Management at Your Fingertips.

    DNS Resolver redirect over OpenVPN with failover gateway group

    Scheduled Pinned Locked Moved Routing and Multi WAN
    1 Posts 1 Posters 259 Views 1 Watching
    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.
    • ?
      A Former User
      last edited by [[global:former-user]]

      I have an edge case here. Maybe someone tried this before.

      I'm trying to forward most DNS queries over an OpenVPN (PIA) connection, with failover to WAN. When the VPN is down, I want queries to go out through default WAN.

      So far, the VPN connection is working fine. I can route traffic from LAN hosts over the VPN through NAT and firewall rules with a Gateway Group which has VPN as primary and WAN as secondary.

      My problem is with the DNS Resolver. As far as I can tell, I have to use Floating Rules because the DNS Resolver falls in the "Filter traffic from the firewall itself" category. But it doesn't seem to work. I see outgoing traffic in the logs, but hosts are not resolved.

      The floating rule that I tried:
      Action: Pass
      Interface: WAN
      Direction: out
      Proto: TCP/UDP
      Source: any
      Destination: any
      Destination Port: 853
      Gateway: PIA gateway group

      Some other settings:

      • DNS resolver set to forwarding mode, enabled DNSSEC, SSL/TLS, Register DHCP static mappings in the DNS Resolver
      • Gateway Group with PIA as Tier 1 and WAN as Tier 2
      • NAT Outbound Hybrid. Interface: PIA, Adress: Interface Address
      • multi-wan setup
      • setup DNS Servers for each gateway in General Setup
      1 Reply Last reply
      Reply Quote 0

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      • First post
        Last post
      Copyright 2026 Rubicon Communications LLC (Netgate). All rights reserved.
      Privacy Policy · Cookie Policy