On this page
Facts
What it is
VPN: TUN for IP packets, TAP for Ethernet frames
Since, by
James Yonan, 2001; now OpenVPN Inc. and the community
Transport
UDP by default, or TCP
Encryption
TLS for keys; AES-GCM or ChaCha20-Poly1305 for data
To the network it looks like
Its own header: an opcode byte, TLS inside
Usual port
1194 assigned by IANA; any UDP or TCP port
Comes as
.ovpn text file with certificates and keys inline
License
GPLv2 for OpenVPN 2.x
Latest release
openvpn v2.7.9, November 5, 2026
In Veli
Windows, Linux · file
Own server from the app
Yes
Versions and history
- 2001
Version 0.90
The first release on 13 May 2001: an IP tunnel over UDP with the Blowfish cipher and an SHA1 HMAC.
- 2002
1.0 brings TLS
OpenVPN 1.0 of March 2002 adds TLS-based authentication and key exchange, the design it keeps today.
- 2005
2.0 and port 1194
OpenVPN 2.0 comes out in April 2005. From 2.0-beta17 the default port is 1194, assigned by IANA; earlier versions used 5000.
- 2016
2.4: AES-GCM and tls-crypt
Data ciphers are negotiated, AES-256-GCM by default; P_DATA_V2 with a peer ID lets a client change address without a new handshake;
tls-cryptencrypts the control channel. - 2020
2.5: ChaCha20 and tls-crypt-v2
ChaCha20-Poly1305 for data,
data-ciphersin place ofncp-ciphers, a key per client withtls-crypt-v2. BF-CBC leaves the default cipher list. - 2023
2.6: data channel offload
OpenVPN 2.6.0 can hand the data channel to a kernel module (DCO), with the driver in the Windows installer. ChaCha20-Poly1305 joins the default list, and
cipheris ignored in TLS mode. - 2026
2.7 and the kernel's ovpn module
Linux 6.16 has its own DCO module,
ovpn, and it works only with OpenVPN 2.7 and later, released in February 2026.
How OpenVPN works
OpenVPN runs two channels over one UDP or TCP connection. The control channel carries a TLS handshake: certificates are checked, a user name and password can be sent, and the keys for the data channel are agreed. TLS needs reliable delivery and UDP doesn't give it, so OpenVPN wraps TLS records in its own control packets with numbers, acknowledgements and retransmission.
The data channel carries your traffic, encrypted with the agreed keys, which are renegotiated every hour by default (reneg-sec 3600). With dev tun it carries IP packets; with dev tap it carries Ethernet frames, which can bridge two networks but isn't supported by every client.
The server manages its clients: it pushes the tunnel address, routes and DNS servers, and it can check passwords and second factors through plugins or scripts.
Packets on the wire: the opcode byte
Every OpenVPN packet starts with one byte that holds the opcode in its top five bits and a key ID in the bottom three. Over TCP a two-byte length comes first. With the usual key ID 0, the first bytes of a session are predictable:
7
First byte
0x38NameP_CONTROL_HARD_RESET_CLIENT_V2
When it appearsThe client's first packet
8
First byte
0x40NameP_CONTROL_HARD_RESET_SERVER_V2
When it appearsThe server's reply
10
First byte
0x50NameP_CONTROL_HARD_RESET_CLIENT_V3
When it appearsThe first packet with tls-crypt-v2, carrying the client's wrapped key
4
First byte
0x20NameP_CONTROL_V1
When it appearsTLS handshake records
5
First byte
0x28NameP_ACK_V1
When it appearsAcknowledgements of control packets
9
First byte
0x48NameP_DATA_V2
When it appearsYour data, with a 3-byte peer ID (2.4 and later)
6
First byte
0x30NameP_DATA_V1
When it appearsYour data from older peers
tls-auth, tls-crypt and tls-crypt-v2
Three optional settings protect the control channel with a pre-shared key. They decide whether a stranger gets any answer and how much of the handshake a network can read.
tls-authWhat it addsAn HMAC on every control packet: the manual calls it an “HMAC firewall”. Unsigned packets are dropped without reply.
What stays readableEverything: the TLS handshake and the certificates travel in the clear
tls-crypt(2.4)What it addsEncrypts and authenticates control packets with a key all clients share. Hides the certificate and makes OpenVPN harder to identify.
What stays readableThe opcode, the 8-byte session ID and the packet ID
tls-crypt-v2(2.5)What it addsA key per client. The client sends its key, wrapped by the server's key, in its first packet, so the server can refuse it before TLS starts.
What stays readableThe same header, and opcode 10 in the first packet
Data ciphers and DCO
Data ciphers are negotiated: the client lists what it supports, and the server picks the first match from its data-ciphers. In 2.6 the default list is AES-256-GCM:AES-128-GCM:CHACHA20-POLY1305, the last one where the TLS library has it. BF-CBC, the old 64-bit-block default, left that list in 2.5, and OpenSSL 3 offers it only with its legacy provider.
DCO (data channel offload), added in 2.6.0, moves encryption and forwarding of your packets into a kernel module, and the program keeps only the control channel. On Windows the driver ships with the official installer from 2.6.0; on Linux the ovpn module is part of the kernel from 6.16 and works with OpenVPN 2.7 and later. DCO needs dev tun, an AEAD cipher and no compression; with other settings OpenVPN switches it off and says so in the log.
The .ovpn file, line by line
client
dev tun
proto udp
remote 203.0.113.10 1194
resolv-retry infinite
nobind
remote-cert-tls server
data-ciphers AES-256-GCM:CHACHA20-POLY1305
auth-user-pass
verb 3
<ca>
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
</ca>
<cert>
...
</cert>
<key>
...
</key>
<tls-crypt>
-----BEGIN OpenVPN Static key V1-----
...
-----END OpenVPN Static key V1-----
</tls-crypt>Values are examples. The blocks can also be separate files: ca ca.crt, cert client.crt, key client.key.
clientWhat it meansShort for
pullandtls-client: take settings from the server and act as the TLS client.dev tunWhat it meansAn IP tunnel.
dev tapcarries Ethernet frames, and then both ends must use it.proto udpWhat it meansTransport. UDP is the default;
tcpmakes the client connect over TCP, and the server must listen on TCP.remote 203.0.113.10 1194What it meansServer and port; a third word can set the protocol. Several
remotelines are tried in turn.resolv-retry infinite,nobindWhat it meansKeep retrying the server's name; don't hold a fixed local port. In 2.6 both are already the default for a client.
remote-cert-tls serverWhat it meansAccept only a certificate marked for server use, so another client's certificate can't pose as the server.
data-ciphersWhat it meansData ciphers this client accepts. The older
cipherline is ignored in TLS mode from 2.6 on.auth-user-passWhat it meansThe server also wants a user name and password; with a file name after it, they are read from that file.
<ca>,<cert>,<key>What it meansThe certificate authority, the client certificate and its private key, pasted into the file.
<tls-crypt>What it meansThe key that wraps the control channel. Other setups have
<tls-auth>withkey-direction 1, or<tls-crypt-v2>.
What a censor sees
- The opcodes. In “OpenVPN is Open to VPN Fingerprinting” (Diwen Xue and co-authors, USENIX Security 2022) a filter read the opcode byte of the first packets: a client reset, a server reset, then a few kinds of control and ACK packets. Plain OpenVPN shows this sequence over both UDP and TCP.
- The ACKs. Acknowledgements are all one size and appear only during the handshake. That second fingerprint still works when the opcode byte is scrambled with an XOR patch.
- Probing. With tls-auth or tls-crypt the server doesn't answer strangers, but the researchers still told OpenVPN servers apart by timing over TCP: a 16-byte client reset is dropped at once, while the same bytes minus one make the server wait for the rest.
- The result. At Merit, a regional ISP serving about a million users, the framework identified over 85% of OpenVPN flows with negligible false positives, 1,718 of 2,000 test flows, and connections to 34 of 41 “obfuscated” VPN configurations sold by commercial providers.
- tls-crypt and port 443 don't hide it: the opcode byte stays in the clear, and TCP on 443 is still not HTTPS, even with
port-sharepassing other visitors to a web server. - In practice: from 7 August 2023 users of several Russian mobile networks reported OpenVPN over UDP and TCP, port 443 included, being cut together with WireGuard (net4people #274).
Strengths and weaknesses
Strengths
- Runs over UDP or TCP on any port, so it fits networks that pass only TCP.
- Access the server controls: certificates that expire and can be revoked, passwords, second factors through plugins.
- The server pushes addresses, routes and DNS, so client files rarely need editing.
- Clients exist for all major systems, and TAP mode can bridge Ethernet networks.
Weaknesses
- Recognised by DPI from the first packets: opcodes, ACK sizes, probe timing.
- Over TCP it stalls on packet loss, because TCP runs inside TCP.
- Without DCO every packet goes through a user-space program, which costs throughput.
- Hundreds of options: an old cipher or compression can be left on by mistake.
Where it works
Programs and servers from our comparison tables that list this protocol.
Clients
- AmneziaVPN
- podkop
Servers and panels
- Hiddify Manager
- PiVPN
Sources
- OpenVPN 2.6 manual page
- OpenVPN source: ssl_pkt.h (packet opcodes)
- OpenVPN source: tls_crypt.h (tls-crypt packet format)
- OpenVPN 2.6 Changes.rst (changes in 2.4, 2.5 and 2.6)
- OpenVPN source: README.dco.md
- OpenVPN wiki: changes in OpenVPN 1.x
- USENIX Security 2022: Xue et al., OpenVPN is Open to VPN Fingerprinting
- net4people BBS #274: OpenVPN and WireGuard blocking in Russia, 2023