Prepare an Advanced Dual-Stack Deployment

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

Advanced OpenVPN with IPv6 · Advanced IPv4 · Simple policies

Start with the IPv4 preparation contract and the selected use-case worksheet. Add IPv6 deliberately; do not remove the IPv4-only guard and assume the remaining rules cover both families. The examples retain dedicated systemd-managed OpenVPN Community instances and nftables, without custom eBPF.

Extend the inventory

Record each application/resolver context, VPN role, inner address family, outer numeric peer, interface/namespace identity, provider endpoint, source prefix, return path and rule/table owner. Distinguish host output from forwarded namespace traffic. Include all addresses an application may select, including temporary addresses; a rule protecting only one recorded address is insufficient.

These are read-only commands for a later Linux inventory. They were not executed here:

openvpn --version
openvpn --help
systemctl --version
nft --version
ip -Version
uname -r
ip -4 address show
ip -6 address show
ip -4 rule show
ip -6 rule show
ip -4 route show table all
ip -6 route show table all
ip -6 neigh show
nft -n list ruleset

Use the exact executable from the intended unit, not merely whichever openvpn is on PATH. Inspect unit/drop-in identities, private profile revision, running invocation, management protocol and every required IPv6 capability. No version threshold automatically accepts an installed package. Keep credentials and secret-bearing configuration private. Address inventory, routing inventory.

Establish both route families

The IPv6 policy database is not an IPv4 table with longer addresses. Read back each family’s selection for the actual application identity, namespace, mark, source and destination. Keep local routing intact. A failed or empty protected lookup must terminate behind a verified restriction instead of falling through to the physical-interface default. The ip-rule manual describes rule traversal and terminal actions.

Use provider-authorized tunnel addresses and prefixes with an established return route. Do not copy IPv4 masquerading into a presumed NAT66 solution. A ULA or link-local address alone does not establish Internet reachability. Scope a link-local next hop or resolver by interface; a similarly spelled address on another link is not the same endpoint.

Record address readiness, route/prefix lifetimes, source selection and neighbor state. Do not qualify a tentative or failed-DAD address as usable. A deprecated but still valid address is not automatically the same as an invalid address; its continued use depends on the reviewed source-selection policy and actual checks. RFC 4862.

The neighbor cache’s ordinary STALE state is not by itself a failed health check. It triggers normal reachability handling when traffic uses the entry; classify loss from the required current path evidence. RFC 4861, Section 7.3.

Router advertisements can install defaults, and RFC 8106 defines advertised DNS configuration. Separate permission to learn an underlay route from permission to adopt a DNS provider. Record the actual resolver manager’s RA/DHCP/OpenVPN inputs and verify their resulting selection. A newly learned provider must not override the use case.

Inspect IPv6 forwarding, RA acceptance, autoconfiguration and redirect settings per interface and namespace. The kernel documentation gives different RA behavior with forwarding enabled; do not prescribe a blanket host-wide toggle. The reference profile rejects unapproved redirect-driven policy changes. Infrastructure changes require reconciliation, not a new repair budget.

Verify OpenVPN and service capabilities

Review ifconfig-ipv6, route-ipv6, selected push handling and the actual provider’s IPv6 support against the OpenVPN manual. route-nopull is not complete isolation, and global redirect directives do not implement selected-application routing. block-ipv6 deliberately rejects tunneled IPv6; it cannot remain enabled for paths being qualified for IPv6 service. Replace its protection only through the closed-first handover below.

Retain native management HOLD, sole ownership and the accepted retry limits. Select and verify the outer peer/family separately; changing an outer endpoint consumes the same owned retry authority. This set does not create an unbounded remote list or automatic direct-DNS bootstrap.

Review socket-family restrictions in application, resolver, observer and owner units. An IPv4-only restriction can prevent IPv6 use; allowing AF_INET6 does not enforce the route. systemd execution settings. Also inspect DCO, flow offload and any accelerated path: disable an unaccepted path in the reviewed profile or establish full gate coverage before activation.

Classify actual packet families, not only socket API names. Linux’s IPv6 API can handle IPv4-mapped connections, so an IPv6-capable socket is not evidence that an IPv6 packet traversed the intended route. Linux IPv6 API.

Retain independent permissions

Use explicit family-aware endpoint identities in the existing finite-permission/fixed-cutoff model. Record address family, application/resolver context, role, interface/namespace, provider, configuration/activation generation and expiry. An IPv4 result cannot renew an IPv6 payload permission. A DNS grant requires its complete declared service checks.

The nftables manual defines inet processing for both families, but expressions and address sets still need correct family types. Match the intended transport through extension headers; ip6 nexthdr tcp alone is insufficient. Fragment/reassembly and hook ordering must be accepted rather than assumed. Cover established traffic before broad accepts, local resolver forwarding, both directions where required, and every owned namespace path. Do not accept all link-local, multicast, related or established traffic as a shortcut.

Delayed publication, revoke/grant races, generation conflicts and absolute expiry retain the IPv4 contract. Use separate scoped memberships/cutoffs, and a reconciled multi-family provider transition. Atomic rule changes alone do not make delayed replay safe. The managed-clock and renewal prerequisites are unchanged; no installed host is accepted here.

Allow necessary control traffic narrowly

IPv6 needs more than application TCP/UDP rules. Apply RFC 4890’s ICMPv6 guidance to the actual link and node role. Declare necessary neighbor discovery, router discovery, address-configuration and multicast-listener control separately from application grants. Restrict them by appropriate interface, scope, message validation and trusted configuration ownership. Do not blindly require a link-local source for every message: duplicate-address checks can use an unspecified source.

RFC 4861 specifies checks including hop limit 255 for relevant neighbor-discovery messages. That check excludes off-link senders; it does not authenticate a router on the local link. TUN and physical interfaces need different control policies. Link-control exceptions do not authorize user DNS or payload.

Preserve relevant ICMPv6 errors, including valid Packet Too Big messages for permitted flows. Blocking them can break IPv6 path-MTU discovery. A successful ping or small exchange is not a proof that larger application traffic will work. Validate inner and outer MTU behavior during later acceptance without inventing new controller timers.

Activate without an unguarded interval

  1. Record before-state and independent administrative access. Inventory every required family and resolver context; leave unsupported paths denied.
  2. Install/read back the new static IPv4/IPv6 restrictions and closed scoped gates while the previous guard remains effective. Reconcile ownership before replacing any old guard.
  3. Admit only confined infrastructure, transport and health traffic. Establish the exact OpenVPN identity and usable addressing/routes for each declared path.
  4. Start the existing independent supervision/clock/expiry controls. Qualify DNS and each payload family under the unchanged limits, using concurrent bounded observations where needed.
  5. Verify actual-client routing and resolver selection behind the readiness boundary. Release only eligible permissions; begin their 120-second confirmation after verified release.
  6. Preserve manual holds, provider selections and durable incident/reset identities. Complete the later acceptance checks before describing any host as accepted.

The controller, broker and resolver/application adapters now have local source implementations and offline checks; their Ubuntu host bindings and Linux acceptance remain outstanding. The inventory snippets above are not an installation recipe and do not exercise these controls.