On this page
Facts
What it is
SSL VPN: full IP tunnel, AnyConnect-compatible client and server
Since, by
Client 2009, ocserv server 2013; open source community
Transport
TLS over TCP, plus DTLS over UDP for data
Encryption
TLS 1.2+ and DTLS; old Cisco DTLS for legacy clients
To the network it looks like
HTTPS to one server, plus DTLS on UDP
Usual port
443 on TCP and UDP (ocserv defaults)
Comes as
Server URL and login; ocserv.conf on the server
License
Client LGPL-2.1, ocserv GPLv2+
In Veli
Not supported
Versions and history
- 2009
OpenConnect 1.00
The first non-beta release of the client comes out on 18 March 2009. The project started because Cisco's own AnyConnect client fell short on Linux.
- 2013
ocserv 0.0.1
The server side appears on 20 February 2013: an AnyConnect-compatible VPN server for Linux under GPLv2+.
- 2015–2019
Beyond Cisco
Juniper SSL VPN arrives in 7.05 (2015), Palo Alto GlobalProtect in 8.00 and Pulse Connect Secure in 8.04 (both 2019).
- 2022
F5, Fortinet, Array
Version 8.20 (February 2022) adds F5 Big-IP, Fortinet FortiGate and Array Networks SSL VPN, each chosen with
--protocol. - 2023
Camouflage, draft 04
ocserv 1.2.0 (July 2023) adds camouflage, which hides the VPN behind a secret URL. The open protocol description reaches draft-mavrogiannopoulos-openconnect-04 the same month and later expires.
- 2026
OpenConnect 9.20, ocserv 1.6.0
After three years without a release the client ships 9.20 and 9.21 in June 2026; ocserv 1.6.0 follows on 16 October.
How an OpenConnect session works
The client opens TLS to the server, usually on TCP 443, and logs in with ordinary HTTP requests. It posts an XML document called config-auth and gets back a form with username and password fields; there can be several rounds, for a one-time code for example. A client certificate or Kerberos (SPNEGO) can replace the password.
After login the client sends CONNECT /CSCOSSLC/tunnel on the same connection. The server replies with headers that set up the VPN: X-CSTP-Address and X-CSTP-Netmask give the client its address, X-CSTP-DNS the resolvers, X-CSTP-Split-Include the routes. With no split routes the client sends everything through the tunnel. From then on IP packets travel inside TLS, each behind an 8-byte header that starts with the bytes STF. This channel is called CSTP.
TCP inside TCP stalls on lossy lines, so the client also tries UDP. It asks for DTLS with X-DTLS-CipherSuite: PSK-NEGOTIATE, the server answers with X-DTLS-Port and X-DTLS-App-ID, and both sides derive the DTLS key from the TLS session (an RFC 5705 exporter with the label EXPORTER-openconnect-psk), so no key crosses the wire. If UDP is blocked, the TLS channel carries everything on its own.
Older Cisco clients use a DTLS variant that predates the standard. ocserv still speaks it when cisco-client-compat and dtls-legacy are on; OpenConnect 7.08 and newer use the PSK method instead.
One client, seven VPN protocols
The --protocol option picks the kind of gateway. Cisco's protocol is the default, and the manual still marks the other six as experimental. Some of them send data over ESP instead of DTLS; --no-dtls turns off both. Cisco renamed its own client to Cisco Secure Client (including AnyConnect) with release 5, and the protocol kept working as before.
anyconnectGatewayCisco AnyConnect and Secure Client gateways, ocserv
Supported since1.00, 2009
ncGatewayJuniper Network Connect
Supported since7.05, 2015
gpGatewayPalo Alto Networks GlobalProtect
Supported since8.00, 2019
pulseGatewayPulse Connect Secure, now Ivanti
Supported since8.04, 2019
f5GatewayF5 Big-IP
Supported since8.20, 2022
fortinetGatewayFortinet FortiGate
Supported since8.20, 2022
arrayGatewayArray Networks SSL VPN
Supported since8.20, 2022
ocserv settings and the client command
There is no share link like vless://. A client needs the server address, a login and, for a server with a private certificate, a pin of its key. On the server everything sits in ocserv.conf; these are the lines that decide what the network and a prober get to see.
sudo openconnect --protocol=anyconnect -u alice --servercert pin-sha256:q5Gz1nJ3Vf0bT7uK2mY8xWcE4rP6sA9dL1hN0oQ3iZk= https://vpn.example.com/?mysecretkey--servercert accepts only the server key with this pin and turns off the system CA check. For a certificate from a public CA, leave it out.
tcp-port,udp-portExample
443What it doesTLS and DTLS ports, one pair for the whole server
authExample
plain[passwd=/etc/ocserv/ocpasswd]What it doesLogin method: plain, PAM, RADIUS, certificate, GSSAPI or OIDC
camouflageExample
trueWhat it doesWithout the secret the server answers like a web server
camouflage_secretExample
mysecretkeyWhat it doesThe word a client puts after
?in the server URLcamouflage_realmExample
Restricted ContentWhat it doesBrowser login prompt; when unset, 404 instead of 401
cisco-client-compat,dtls-legacyExample
trueWhat it doesOld pre-standard DTLS for legacy Cisco clients
dpdExample
90What it doesDead peer detection, in seconds
What a censor sees
Passively, OpenConnect is a TLS connection to one server on TCP 443 and, with DTLS on, a DTLS session to UDP 443 of the same host. The login, the CONNECT request and the X-CSTP headers all travel inside TLS, so an observer sees the server name in the ClientHello and a long-lived connection, not the VPN headers.
Active probing is the weaker spot. In October 2020 an OpenConnect maintainer wrote on the project's mailing list that the /CSCOSSLC/tunnel path cannot change because every client uses it, and that ocserv's TLS library, GnuTLS, is rare among real web servers, so its TLS fingerprint alone can give the server away.
Camouflage, added in ocserv 1.2.0 in 2023, answers the first point: without the secret in the URL every request gets an HTTP error, 401 with a login prompt or 404. The sample config itself advises changing the default realm, since Restricted Content is a fingerprint too. Cisco's desktop clients check for a captive portal at the address without the secret, so that check has to be turned off for them to connect. Camouflage does not change the TLS fingerprint.
We found no published measurement of how censors detect OpenConnect or ocserv. The closest work is Xue et al. at USENIX Security 2024: they detected obfuscated proxies by the TLS handshakes nested inside the outer encryption, a trait their paper ties to every kind of proxying and tunnelling. OpenConnect was not tested by name.
Strengths and weaknesses
Strengths
- One open client speaks seven SSL VPN protocols, from Cisco to Fortinet
- ocserv is free and accepts both OpenConnect and Cisco's official clients
- Keeps working over TLS on TCP 443 when UDP is closed
- Camouflage hides the VPN behind a secret URL
- Long history: client since 2009, server since 2013, releases in 2026
Weaknesses
- The protocol is Cisco's; the open description is an expired draft, not a standard
- Without camouflage the fixed tunnel path gives the server away to a probe
- ocserv's GnuTLS handshake is rare among web servers
- Over TCP alone it is TCP inside TCP and slows down on lossy lines
- Six of the seven protocols are still marked experimental
Sources
- OpenConnect: supported VPN protocols and license
- OpenConnect manual: --protocol, --servercert and --no-dtls
- OpenConnect changelog: versions and dates since 2009
- The OpenConnect VPN Protocol Version 1.2, Internet-Draft 04
- ocserv source repository: README, license and NEWS
- ocserv sample.config: ports, login methods and camouflage
- openconnect-devel list, October 2020: detecting ocserv by path and TLS
- Xue et al., Fingerprinting Obfuscated Proxy Traffic, USENIX Security 2024