3. Dedicated Direct DNS — Advanced IPv4

3 Total views across this article’s versions; includes the historical baseline where available.

Advanced IPv4 controls · Simple VPN and DNS policies

Keep host-wide DNS on one designated direct provider, independently of selected applications’ payload VPN. Direct DNS is the required route, not a fallback mode.

Read Prepare an Advanced IPv4 Deployment, Repair Windows and Health Checks, and Operate, Restart and Withdraw alongside this guide. These advanced examples use dedicated systemd-managed OpenVPN instances; the simple walkthrough remains a separate alternative.

Follow the shared Ubuntu 24.04 implementation walkthrough for this use case: configuration, source build, guarded installation, controlled handoff, operating commands and rollback. Select ipv4 and this case in the source bundle. The policy below supplies its DNS scope, application boundaries and permitted failure behavior. OpenVPN Community 2.6 is the reference; exact-build capability checks remain required. Linux execution is deferred.

Define the policy

Traffic Required provider/path
Selected application DNS Designated resolver directly
Other application and host-service DNS Same designated resolver directly
Selected application payload VPN A
Other application payload Direct

DNS scope: Host-wide upstream DNS. This covers conventional upstream unicast DNS in the declared host contexts. Controlled application resolution is required; port-53 filtering alone does not establish that arbitrary encrypted DNS or proxies cannot bypass it. Local stub access is not a separate upstream permission. Protected IPv6 is blocked during this IPv4 phase; the later IPv6 series is separate.

The two permissions for an application are independent. Losing DNS does not revoke healthy known-address payload, and losing payload does not revoke healthy DNS. A common tunnel, physical underlay or protection failure can affect both when both actually depend on it.

Prepare this use case

  1. Record all host resolver contexts and the designated direct provider. Bind upstream DNS to its direct route even while the application VPN is connected.

  2. Assign selected payload to VPN A and ordinary payload to direct routing. Keep the direct DNS service and payload VPN under separate health/permission records.

  3. Identify any locally owned resolver or route configuration eligible for repair. A remote DNS provider is not a local process that the controller can restart. Do not restart VPN A to repair direct DNS.

Complete the deployment worksheet with the shared preparation inventory. It is documentation data, not a loadable configuration. Retain the simple counterpart as an alternative; do not run its mode-switch helper beside the advanced owner.

Activate and observe

Follow the closed-first activation sequence. Install and verify the independent route restrictions before any controlled transport attempt or application grant. Admit only the named OpenVPN instance and numeric peer needed for this use case. Then qualify each DNS/payload class separately and read back the actual resolver/route selection in its client context.

At startup, each permitted class must release before its fifteen-minute allowance expires. Successful release begins its own 120-second confirmation. Record the selected provider, class state, OpenVPN invocation, current checks, attempt count and remaining authority; an interface or an “active” service alone does not prove useful traffic is flowing.

Respond to failure

Observed condition Required behavior
Direct DNS service fails Deny DNS for both groups. Keep healthy selected VPN payload and ordinary direct payload working by known address.
Payload VPN fails Deny selected payload. Continue healthy direct DNS for selected and ordinary applications.
Direct path fails Deny the traffic actually dependent on that path. If the same physical underlay also carries VPN transport, classify that shared dependency explicitly.
Direct DNS recovers before the payload VPN Release DNS independently; selected payload stays blocked until its own path qualifies.

Unavailable, degraded and unknown required service all invoke the relevant loss response. Keep static no-escape restrictions installed before detection, during repair and after lockout. Use the shared repair rules and report the actual failure reason. A remote DNS error does not automatically authorize a tunnel restart.

Work through one incident

At 00:00 the dedicated resolver stops answering. DNS closes while a selected application’s existing numeric connection continues through VPN A. Recheck the same direct DNS service and repair only implicated owned configuration. If it qualifies, restore DNS without reconnecting VPN A. A remote-provider outage may simply require waiting within the bounded windows and eventual operator intervention.

These are constructed operating examples. They are not measured Linux timings. Check failures, expired evidence, failed publication or unknown controls can close the relevant class earlier than an outer repair deadline.

Return, restart and withdraw

There is no return-to-VPN DNS mode. Direct-service recovery uses the DNS checks and class release controls; it does not run an OpenVPN handshake or acquire the sixty-second VPN qualification merely for a direct resolver.

An explicit operator recovery restart or host boot may replenish the affected allowance once while preserving provider selection and manual holds. Automatic crash/reconnect loops retain counters. Revalidate each class before reopening; restoring a saved provider is not restoring a saved health result. Follow the restart procedure and withdrawal sequence. Close and verify the owned gates before removing owned policy; never fall through to an unapproved route during rollback.

Check the boundary before acceptance

Try VPN DNS and an alternate direct provider during the outage. Neither is a substitute. Verify that selected DNS can still work during a separate payload-VPN outage.

Apply the shared IPv4 failure and acceptance procedure, including existing connections, application-context lookups, stale events, crash/boot resets and expired permissions. Record actual route/packet evidence and state transitions separately. These checks remain unexecuted on Linux.