feat: TLS mode selection during install + client temporary disable/enable#1473
Open
AliHzSec wants to merge 1 commit into
Open
feat: TLS mode selection during install + client temporary disable/enable#1473AliHzSec wants to merge 1 commit into
AliHzSec wants to merge 1 commit into
Conversation
- Add interactive TLS control channel security question during install for both simple and advanced encryption modes, replacing the hardcoded tls-crypt-v2 default with a user prompt - Add 'none' TLS mode option for Cisco/MikroTik router compatibility, which skips key generation and adds no directive to server.conf - Add ccd-exclusive to server.conf with absolute CCD path for per-client access control enforcement - Create CCD file automatically when a client is added - Remove CCD file when a client is revoked - Add disableClient() and enableClient() functions (CCD-based) - Add 'client disable' and 'client enable' CLI subcommands - Show 'disabled' status in client list for certs without CCD file - Update interactive menu with disable/enable options (4 and 5)
414eb75 to
eee2b22
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds two features to improve compatibility and client management.
Problem 1: tls-crypt-v2 hardcoded default breaks Cisco/MikroTik compatibility
The installer always enables
tls-crypt-v2with no option to change itduring setup (only through the advanced encryption path). Profiles with a
<tls-crypt-v2>block are not compatible with Cisco IOS or MikroTikOpenVPN clients — they fail with authentication errors. Manually removing
the block from the
.ovpnfile also fails because the server still expectsthe TLS key.
Fix
A TLS control channel security question is now asked during installation,
in both simple and advanced encryption modes:
When
noneis selected, no TLS key is generated and no TLS directive iswritten to
server.conf. The generated.ovpncontains no TLS block andworks on Cisco/MikroTik clients.
Also available via CLI:
--tls-sig noneProblem 2: No way to temporarily disable a client
The only way to block a client was to permanently revoke their certificate,
which cannot be undone. There was no suspend/resume functionality.
Fix
Uses the
client-config-dir+ccd-exclusivemechanism already supportedby OpenVPN:
ccd-exclusiveadded toserver.conf— only clients with a file in theCCD directory can connect
Two new operations:
Disable (blocks access, certificate stays valid):
Removes the CCD file and immediately disconnects the client via the
management socket. The client cannot reconnect until re-enabled.
Enable (restores access):
openvpn-install client enable aliceRecreates the CCD file. The client can connect again.
Both operations are available in the interactive menu (options 4 and 5).
client listnow showsDisabledstatus for valid certs with no CCD file.Changes
installQuestions()installOpenVPN()TLS_SIG=nonein key generation andserver.conf; addccd-exclusivewith absolute CCD pathnewClient()revokeClient()disableClient()enableClient()cmd_client_disable/enable()listClients()DisabledstatusmanageMenu()Testing
Tested on Ubuntu 24.04 with OpenVPN 2.6.x:
nonemode: no key generated, no directive in server.conf, clean .ovpnclient disable→ client disconnected, cannot reconnectclient enable→ client can reconnectclient revoke→ CCD file removed alongside certificateclient list→ correct status (Valid / Disabled / Revoked)