VPN and DNS Policies

Choosing a VPN does not settle every routing decision. You may want selected applications to use a VPN while everything else stays direct. You may also want DNS to follow a different path from the applications requesting it.

Start with Routing Tools and Scope, then choose the policy below that fits what you want to accomplish. All six use the shared Application Routing Foundation.

Choose Your DNS Policy

In this table, selected applications require their assigned VPN; other application connections remain direct. DNS here means conventional unicast DNS on UDP/TCP port 53. The examples also block port 853; they do not identify every lookup hidden in HTTPS or cover multicast name discovery. The table describes upstream requests leaving the host, not the local request to a DNS stub. On a narrow screen, scroll the table sideways.

Scenario and Tutorial Application Route DNS Route DNS Provider DNS Failure Policy
1. DNS Follows VPN Applications Selected apps: VPN; others: direct Selected apps: VPN; others: direct VPN DNS for selected apps; designated normal provider for others VPN-scoped lookups stop on VPN loss; other DNS keeps its normal path
2A. Strict VPN DNS Selected apps: VPN; others: direct All DNS: VPN VPN DNS or one designated provider reached through VPN No direct fallback; fresh upstream lookups fail
2B. Prefer VPN DNS with Direct Fallback Selected apps: VPN; others: direct All DNS: VPN mode or explicitly selected direct mode VPN DNS in VPN mode; designated provider in direct mode Permits explicit provider/path changes; automatic trigger integration is separate
3. Dedicated Direct DNS Selected apps: VPN; others: direct All DNS: direct, regardless of VPN state Designated DNS provider No silent substitution of VPN DNS
4A. Separate VPNs, Using VPN 1’s DNS Selected apps: VPN 2; others: direct All DNS: VPN 1 VPN 1’s provided DNS Strict: no direct or VPN 2 fallback
4B. Separate VPNs, Using an Independent DNS Provider Selected apps: VPN 2; others: direct All DNS: VPN 1 Designated provider reached through VPN 1 Strict: no direct or VPN 2 fallback

DNS fallback and application fallback are separate decisions. Example 2B permits an explicit change of DNS provider and path; it does not switch automatically or allow VPN-only applications to use the direct connection.

Keep the Three Responsibilities Separate

The walkthroughs configure routing and DNS policy using existing VPN interfaces and return paths. VPN operation and availability checks are covered in separate guides, including OpenVPN/NetworkManager reconnect observations. See Automated OpenVPN Controls for the corresponding six advanced IPv4 use cases and their preparation, operation, timing and acceptance instructions. Their DNS and payload permissions are independent. The automatic controller, persistence/adapters and installation/handoff source now exist. The shared Ubuntu implementation walkthrough connects the advanced guides to those files and commands. Linux runtime validation remains deferred.

The third set, Advanced OpenVPN with IPv6, covers these same six use cases with IPv4 and IPv6 paths explicitly protected and monitored. It retains the approved behavior and timers. The simple walkthroughs and advanced IPv4-only set remain separate alternatives; none gains IPv6 support merely by linking to the third set.

Connect This to Dedicated DNS

Read What Is a Dedicated DNS? and Combining DNS Services with a VPN for the existing discussion.

Explore this Subject

Articles in this Branch

Review History

Preserved pre-review draft (text). Technical source review and local page validation were completed November 26, 2026. These simple examples retain explicit manual route/provider selection. The separate advanced Ubuntu walkthrough covers automatic controls, persistence, installation and rollback using the completed local reference source. Linux runtime validation remains deferred.