SSL VPN
SSL VPN profiles speak Cisco's AnyConnect protocol, which ocserv, the open-source OpenConnect server, also serves, and the protocols of F5 BIG-IP and Palo Alto GlobalProtect. SRP VPN Connect speaks all three with the same OpenConnect client core (9.21) on iPhone and Android.
How an SSL VPN connection works
- TCP and TLS. The app opens a TLS connection to the server, on port 443 unless the profile names another. With TLS Server Verification on, the server's certificate must be trusted by the phone and issued for the server's name.
- Login. The server sends its login form; the app fills in the profile's username and password, or presents its client certificate during the TLS handshake. The server answers with a session cookie.
- The tunnel. With the cookie, the app opens the tunnel over TLS. The server gives it an address, DNS servers and the routes that go through the tunnel: everything, or only some networks.
- DTLS. When the server also offers DTLS on UDP, the VPN's packets travel over it, which suits them better than TCP. When UDP does not get through, everything stays on the TLS connection.
- Keeping the session. If the connection breaks, or the phone moves to Wi-Fi, the app resumes the same session with its cookie, so it keeps its address without a new login.
Server types
- AnyConnect: tested on both phones against ocserv 1.2.4, the AnyConnect server Ubuntu 24.04 ships. Every result in Test results is from it.
- F5 BIG-IP and Palo Alto GlobalProtect: the same core speaks them, on both phones, but we had no F5 or Palo Alto server to test against. Treat them as untested.
Where to start
- Set up the server: ocserv (AnyConnect server) installs and sets up ocserv on Ubuntu, with password and certificate users and a split-tunnel group.
- Install the app: on iPhone from TestFlight, on Android by building it from the source; see Installation. On iPhone use TestFlight build 38 (commit
b562f41d) or later, the first with all of the SSL VPN behaviour these pages describe, the Path field for an ocserv with camouflage included. Its app code is build 37's (commit23ec28b1) with the Path commitec77a882. Our tests ran build 37's code on the iPhone and commit4aae66d7on Android, and the Path cases onec77a882on both. - Add an SSL VPN profile: Setting up the app.
- The server settings that matter to the app, and what each profile field does: Configuration Reference.
- If it does not connect: Troubleshooting.
What was tested
Test results lists every case we ran against our ocserv, with its result on an iPhone and on an Android phone: transfers over DTLS and over TLS alone, password and certificate logins and their refusals, the certificate check, other ports and wrong server names, a Server Type the server does not speak, TLS 1.3, DTLS without PSK, compression, a split-tunnel group, ocserv's ban and camouflage, a server with only TLS 1.1, TLS Fragmentation, the log levels, and what happens on sleep, when the server ends the session or resets the connection, when the phone switches networks, when the server is away for a while and when Retry Times runs out.