Advanced OpenVPN with IPv6 · Advanced IPv4 · Simple policies
Prefer host-wide DNS through VPN A, with the same explicit permission to select one direct fallback service. Selected payload remains VPN-only in both DNS modes.
Read the path and failure boundaries first. This is the same policy as advanced IPv4 and the simple walkthrough, with IPv6 explicitly covered. They are alternative deployments, not concurrent owners.
Follow the shared Ubuntu 24.04 implementation walkthrough for this use case: configuration, source build, guarded installation, controlled handoff, operating commands and rollback. Select ipv6 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 path for each enabled family |
|---|---|
| DNS | VPN A preferred; one designated direct DNS fallback |
| Selected application payload | VPN A for IPv4 and IPv6 |
| Ordinary application payload | Direct IPv4/IPv6 |
DNS scope: Host-wide upstream DNS. DNS transport endpoints are declared separately from A/AAAA record types. All required checks for the selected DNS service must pass; an undeclared family is not an implicit alternate. DNS-only loss preserves healthy known-address payload. Payload-only loss preserves healthy DNS. Family-specific payload loss closes that family; a common session/control fault affects every actual dependent.
Prepare the roles and endpoints
-
Inventory the preferred and fallback providers separately, including each service’s required transport families and exact endpoint/interface identities. They need not offer identical DNS transport families, but each must satisfy its own declared profile.
-
Persist one DNS mode/provider for the entire resolver context. Do not leave IPv6 requests on the old provider while moving IPv4 requests to fallback. Confined candidate probes are not application forwarders.
-
Select manual-return or automatic-return behavior. Preserve its existing residence, qualification and authority rules. Establish IPv4/IPv6 payload guards independently of the DNS selection.
Complete the IPv6 deployment worksheet and the shared inventory. The worksheet is documentation, not loadable controller configuration. Unsupported or unreviewed IPv6 paths remain denied; an IPv4-only provider cannot be advertised as carrying IPv6 merely because the client has a global IPv6 address.
Activate behind existing protection
Use the closed-first handover: establish and verify both families’ restrictions before replacing the older IPv6 block. Confine DNS/probes/OpenVPN transport separately. Qualify the selected DNS service and each payload family on current evidence; verify actual application route and resolver selection before releasing each eligible permission.
The fifteen-minute startup allowance, 4:30 complete attempts and eighty-second qualification ceiling are unchanged. An interface, AAAA answer or successful connection using another family is insufficient. The controller and adapters are implemented as local reference source with offline checks. These operating requirements still need acceptance on the target Linux host.
Respond to the actual failure
| Observed condition | Required response |
|---|---|
| Any required preferred DNS check fails | Close application DNS and qualify only the designated fallback. Healthy payload continues. |
| Fallback qualifies while VPN payload is down | Release the permitted DNS service; keep failed selected payload paths closed. |
| Preferred repair reaches cooldown/final failure | Retain healthy selected fallback with its own supervision; do not reset preferred repair. |
| Selected fallback fails too | Close DNS unless an independently qualified permitted replacement has valid authority. |
| Selected IPv6 payload fails alone | Do not send it directly just because direct DNS is selected; preserve healthy DNS and permitted IPv4 payload. |
Degraded or unknown required state counts as loss. Keep no-escape restrictions throughout detection, repair, cooldown and lockout. A DNS-only error does not authorize restarting a healthy shared tunnel. One OpenVPN owner retains one set of attempt counters; adding a family does not multiply them.
Work through an incident
Preferred DNS requires IPv4 and IPv6 transports. Its IPv6 path fails at 00:00, so the service closes despite successful IPv4 queries. Complete fallback rounds at 00:02, 00:07 and 00:12 meet the existing count/span. Assume actual selection and client verification finish at 00:25: DNS releases and confirms through 02:25. Healthy fallback stays selected at 15:00, during cooldown, and after unsuccessful final preferred repair at 45:00. These are illustrative times, not new deadlines.
Apply the unchanged health and recovery limits. Examples are constructed timelines, not Linux measurements. Earlier operation deadlines, expiry and manual intent still take precedence.
Return, restart and withdraw
Manual return waits for an explicit instruction and valid authority. Automatic return requires the complete preferred DNS qualification and sixty seconds of healthy fallback residence; these periods overlap. A failed fallback can be left early only for an independently qualified permitted replacement. Healthy fallback survives preferred cooldown/final lockout.
An explicit operator recovery restart or host boot may replenish eligible allowances once. Preserve selected providers and manual holds; automatic crashes, reconnects and address-family changes do not reset budgets. Revalidate before release. Follow the operation and withdrawal instructions, especially restoring protected IPv6 denial before returning to the IPv4-only set.
Check the forbidden paths
Test simultaneous preferred IPv6 plus direct IPv4 DNS selection, a third provider, candidate-probe proxying and direct selected payload in both families. All remain forbidden.
Apply the dual-stack acceptance matrix, including IPv6-only loss, IPv4-only loss, both DNS query types, independent expiry and shared-session failures. Linux tests remain unexecuted.