Limit WireGuard exemption to NordVPN endpoints

This commit is contained in:
ms2k 2026-08-03 01:03:22 +09:00
commit 1c3112245a

View file

@ -24,7 +24,7 @@ flowchart LR
## Requirements
| Area | Requirement |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Runtime | Health checking and reconciliation run on the OPNsense appliance. |
| Configuration | Plugin configuration is available through the OPNsense WebGUI. |
| Bootstrap | The WebGUI accepts a NordVPN Access Token to obtain the initial NordLynx private key. |
@ -36,7 +36,7 @@ flowchart LR
| Ownership | The operator owns referenced OPNsense aliases. The plugin owns the Managed Tunnel, its associated gateway, and its generated firewall rules. |
| Direct egress | The operator can select the Direct Egress Gateway. |
| Failure policy | Fail closed is the default. Fail open is an operator-selected option. |
| WireGuard exemption | An operator-selected toggle routes outbound UDP destination port `51820` traffic through the Direct Egress Gateway ahead of NordVPN policy routing. |
| WireGuard exemption | An operator-selected toggle routes outbound UDP destination port `51820` traffic to NordVPN NordLynx server addresses through the Direct Egress Gateway ahead of NordVPN policy routing. |
| Repository data | Committed content contains no secrets or configuration values that identify or distinguish an actual deployment. |
## Bootstrap
@ -76,7 +76,7 @@ flowchart TD
```mermaid
flowchart TD
Packet[Outbound IPv4 packet] --> Exemption{UDP destination port 51820 exemption enabled?}
Packet[Outbound IPv4 packet] --> Exemption{NordVPN NordLynx destination on UDP port 51820 and exemption enabled?}
Exemption -->|yes| Direct[Direct Egress Gateway]
Exemption -->|no| Enrolled{Matches NordVPN Egress Enrollment?}
Enrolled -->|no| Native[Continue native OPNsense rule evaluation]
@ -91,13 +91,13 @@ flowchart TD
## Acceptance
| Capability | Required result |
| ------------------- | --------------------------------------------------------------------------------------------------- |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| Bootstrap | The operator can obtain and configure the initial NordLynx private key through the WebGUI. |
| Stable operation | A healthy Managed Tunnel retains its current server. |
| Failover | An unavailable Managed Tunnel changes to another eligible server when one establishes availability. |
| Country selection | Selected servers satisfy the country allowlist when it is not empty. |
| Traffic enrollment | Matching IPv4 traffic uses the Managed Tunnel gateway while the Managed Tunnel is available. |
| Enrollment warning | The WebGUI warns when the NordVPN Egress Enrollment can include an RFC 1918 destination address. |
| WireGuard exemption | When enabled, outbound UDP destination port `51820` traffic uses the Direct Egress Gateway. |
| WireGuard exemption | When enabled, outbound UDP destination port `51820` traffic to NordVPN NordLynx server addresses uses the Direct Egress Gateway. |
| Fail closed | Matching IPv4 traffic is blocked while the Managed Tunnel is unavailable. |
| Fail open | Matching IPv4 traffic uses the Direct Egress Gateway while the Managed Tunnel is unavailable. |