WireGuard for SSH: HTTPS with closed web ports
A real VPN peer, SSH and sudo on a separate Debian VM. CLI HTTPS installation, access refusals, replay without writes and controlled rollback.
WireGuard SSH and separate control of web ports
The first CLI HTTPS installer has already been tested with the initial closed management policy. The next practical step explicitly accepts a firewall with a verified WireGuard extension. An admitted VPN peer can access SSH while TCP80/443 stay closed until the separate public-ingress stage.
I created a fresh Debian VM for this check. The initial firewall passed its boot stage and independent serial-console confirmation. Actual CLI commands then prepared the server key and WireGuard configuration, applied and accepted the exact firewall extension, and started the service once. These journals were created on this new disk.
A fixture peer in a separate namespace
The second peer runs in an isolated network namespace on the same VM. It has its own key, exact peer and /32 route. The laptop network was not reconfigured. This exercises real WireGuard traffic between isolated network contexts; it does not measure tunnel reachability over the public Internet.
WireGuard retains its UDP socket in the interface's creation namespace when the interface moves. The mechanism is described in the official network namespace documentation. Our fixture transport remains inside the VM.
The selected administrator key works over SSH
The checks confirmed a handshake, bidirectional transfer, a route through the VPN interface and fresh SSH authentication with the selected key. A separate SSH connection verified password sudo. The private SSH key stayed on the laptop: a separate temporary agent held only this fixture key. The existing user agent was unchanged.
These standard diagnostic commands use placeholders. They are neither the complete CLI nor a raw execution transcript. The public frame summarizes verified results without publishing key values or handshake times:
sudo wg show <WG_IF> latest-handshakes
sudo wg show <WG_IF> transfer
ip route get <PEER_WG_IPV4>
Negative access checks
The admitted peer could not connect to TCP80 or TCP443. Both probes timed out and the input-drop counter increased. SSH to the admitted address succeeded, providing a positive control for the private path.
An SSH attempt from an unadmitted private address was also denied. This observes the combined AllowedIPs and network-policy boundary; it does not attribute every discarded packet to a specific layer. The temporary additional address was removed afterwards. The public recovery SSH channel was checked separately.
Explicit authority for the accepted firewall
The new installer mode binds the accepted WireGuard policy, its native plan and exact manifest. It holds the existing firewall owner's locks, reads accepted state and checks the complete expected ruleset. It does not read the WireGuard private key.
Without explicit selection, the initial mode remains in effect. A wrong manifest, unaccepted transition or foreign rule stops the operation. It does not silently switch modes or widen network permissions to obtain a successful response.
Installing HTTPS and performing a controlled rollback
On the same fixture, the installer created a separate TLS configuration and protected certificate, key and HTTP-password files. After one Nginx reload, a fresh SSH connection checked the result. Eight local HTTP checks and rejection of incorrect SNI passed. These requests reach Nginx locally: their success does not mean the firewall admits external access to the web ports.
A repeated run performed no writes. Content and metadata matched for all 61 selected files before and after replay. Two control attempts to prepare installation — using the original firewall mode and an incorrect manifest — stopped without writes. The tool did not automatically repair the incorrect policy.
A separately prepared rollback removed four TLS-role files and added two rollback-journal files. All 57 preceding files in the selected set were retained. A fresh connection verified rollback; replay again left files unchanged. WireGuard keys, configuration and journals remained exact; private SSH, password sudo and TCP80/443 refusals were confirmed again.
This separates two independent decisions: preparing HTTPS inside the server and admitting the required external traffic. The rented educational VPS and production sites were unchanged during this test. The temporary peer and its material were removed, the separate agent terminated and the VM shut down normally.

Current state and post-reboot evidence
The initial firewall was verified after rebooting this VM. The WireGuard extension was accepted and started in the current boot, so its authority is reported as same-boot adoption. WireGuard startup verification requires a subsequent controlled reboot and separate confirmation.
Local TLS uses a separate fixture CA. Public certificate trust, Cloudflare ingress and a complete unattended server installation remain separate stages.
