Prepare an Advanced IPv4 Deployment

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

Advanced IPv4 controls · Simple VPN and DNS policies

Choose one of the six use cases before preparing the host. The shared controls implement that policy; they must not create additional providers or routes. The first advanced series is IPv4 only and uses dedicated OpenVPN Community client instances owned by systemd. A NetworkManager-owned instance is not an interchangeable owner.

Inventory the host and policy

For the later isolated host review, record the exact OpenVPN executable used by the intended unit, its package/build identity and profile revision. An installed version number is only the start of acceptance: required options, management behavior and the running invocation must match the reviewed profile. The OpenVPN manuals describe available mechanisms; they do not certify every newer package. OpenVPN manual.

These commands are read-only inventory examples for that later Linux review. They have not been executed here:

openvpn --version
openvpn --help
systemctl --version
nft --version
ip -Version
uname -r

The openvpn found on PATH may differ from the executable in the intended unit. Inspect the exact unit and all drop-ins locally, then repeat version/help against its actual executable. Record the executable checksum and package revision. Do not paste credential files or secret-bearing unit/profile contents into a report.

For a real unit name entered by the operator:

VPN_UNIT='REPLACE_WITH_EXACT_INSTANCE.service'
if [ "$VPN_UNIT" != 'REPLACE_WITH_EXACT_INSTANCE.service' ]; then
    systemctl show "$VPN_UNIT" --property=FragmentPath,DropInPaths,MainPID,InvocationID,ActiveState,SubState
fi
ip -4 rule show
ip -4 route show table all
nft list ruleset

Keep the observations local. systemctl show exposes unit properties; it is not a connection-health check. Routing output shows selection state, not proof that a resolver or remote payload endpoint works. systemctl reference, ip-route reference.

Record application identities, resolver contexts, interfaces, route-table/rule IDs, local forwarders, namespaces, underlay dependencies and existing managers. Host-wide DNS includes ordinary applications and host services. If a group or forwarding path cannot be classified, the host-wide claim is not ready for acceptance.

Assign one owner to each resource

Give each dedicated VPN instance a named role, exact unit/profile, restricted management socket and one management owner. Inventory competing service restart policies, timers, dispatchers and provider reconnect helpers. The advanced owner must be the only source of automatic activation for those instances.

The reference design uses separate protected workload groups and resolver contexts. If a service joins an existing network namespace, that namespace must already exist; joining it does not install the policy. Define host-local and forwarded packet coverage separately. systemd execution settings.

Record who owns each table, rule, namespace, resolver context and temporary gate. Do not reserve a whole host firewall as though it were private to this example. A managed resolver shared by unaffected clients cannot be restarted casually to repair one class.

Specify enforcement and control traffic

The adapter must enforce these distinct permissions:

  1. Application DNS: only the selected provider/path for its resolver context.
  2. Application payload: only that group’s permitted VPN or direct route, independent of DNS health.
  3. Confined health/readiness probes: exact candidate/control destinations; never a proxy for application requests.
  4. OpenVPN transport and necessary maintenance: exact numeric peer/transport and reviewed time-source paths, outside the application gate.

Place static no-escape restrictions so a missing preferred route cannot expose a direct/default route. Cover new and established connections and local resolver forwarding. Do not accept all established flows before the class gate. Do not flush the host ruleset or conntrack. The selected nftables design combines finite permissions with fixed cutoffs, identity/generation checks and revocation fencing; an ordinary firewall allow rule is not a substitute. nftables manual.

The IPv4 stage must block protected IPv6 paths, including alternate resolution paths that could otherwise escape the selected policy. Review application encrypted-DNS/proxy behavior separately; a port list is not proof of containment. No IPv6 tunneling instructions are supplied in this series.

Prepare the OpenVPN profile

Preserve the provider’s authenticated peer identity and private credential storage. Use a declared numeric remote for the reference deployment so failed protected DNS is not needed to find the VPN server. A provider endpoint change requires reconciliation; do not silently use arbitrary host DNS to bootstrap it.

The accepted design uses native hold and management control. A profile review must check management-hold, restricted socket access, management-signal, required event reporting, and every chosen retry/hook option. The sole owner observes current HOLD state and native delay, counts the attempt durably, honors that delay and releases once. Enabling a hold flag does not stop a currently working session. Management protocol.

The native policy is a 5–30-second retry delay, up to three admitted attempts per window, 30-second contact ceiling and 45-second TLS ceiling inside the whole 60-second connection episode. Native retry counters supplement the controller’s persistent count; they do not replace it. Review pushed settings and interface/route ownership. In the reviewed manual, route-nopull excludes pushed routes and certain DNS options but still permits interface-property changes; it is not a complete isolation mechanism. OpenVPN routing and retry options.

No ready-to-enable profile or unit is supplied: the locally implemented broker, coordinator, guardian and class-specific adapters still need concrete host bindings and Linux acceptance. Do not attach an ad hoc second management client to an owned instance. OpenVPN management ownership.

Activate behind closed gates

The Ubuntu walkthrough supplies the corresponding commands. Their ordering implements this sequence; actual host execution and acceptance remain deferred:

  1. Save the exact before-state and establish independent administrative access. Complete the selected use-case worksheet.
  2. Install/read back static route restrictions, class gates and protected IPv6 denial. Start closed. Verify ownership and prevent stale writers from publishing new grants.
  3. Load durable policy, manual holds and selected provider. Admit an explicit startup or recovery epoch exactly once; do not grant traffic yet.
  4. Start the independent supervisor and verify its progress, clock profile and expiry controls. Start the coordinator and confined observation workers. Unknown required state keeps the affected permissions closed.
  5. Admit only the required OpenVPN transport, start the dedicated instance held and verify the exact running identity. Let the sole owner conduct bounded attempts.
  6. Qualify DNS and payload independently, verify actual selections/readiness, and publish each class’s bounded permission before its cutoff. Start its 120-second confirmation at verified release.
  7. Complete the failure checks on the isolated host before calling the deployment accepted. A successful configuration parse or interface appearance does not satisfy this step.

Uncontrolled clock steps, unverified permission expiry, unsupported management behavior or incomplete traffic coverage stop activation. Ordinary synchronization under an accepted managed-clock profile is intended to preserve healthy traffic. Exact clock/provider/kernel acceptance remains later host work.

What remains before runnable installation

The controller state engine, durable reset/admission store, management parser, independently expiring nftables broker, observation scheduler and class-specific adapters are implemented as local source with offline checks. The installation/bootstrap executor and controlled handoff now have local source; the Ubuntu walkthrough supplies file preparation, installation, handoff and rollback instructions. Actual host acceptance remains deferred. The operator examples use the implemented private command interface. Host endpoints, application identities, resolver behavior and exact builds also need a concrete deployment inventory. Linux execution remains deferred.