ovpn-dco kernel module. The userspace OpenVPN program acts purely as a control plane application, significantly improving performance.
How it works
With DCO enabled, OpenVPN offloads the data channel processing to the kernel while maintaining control over:- Connection establishment
- TLS negotiation
- Authentication
- Key management
Getting started
On Linux 6.16+, the
ovpn kernel module is included by default. For older kernels, use the ovpn-backports project.git clone https://github.com/openvpn/openvpn.git
cd openvpn
autoreconf -vi
./configure --enable-dco
make
sudo make install
Disabling DCO
To explicitly disable data channel offload:- The kernel module is not available
- An incompatible option is detected
- The configuration is not supported by DCO
Platform support
Linux
Theovpn kernel module was merged upstream in Linux 6.16. It’s compatible with OpenVPN 2.7+.
For older kernels, build the module from ovpn-backports.
Windows
Official releases from openvpn.net include the ovpn-dco-win driver since version 2.6.0. Snapshot releases are available at build.openvpn.net.On Windows, DCO is only supported in client and P2P mode.
P2P mode support
DCO works in P2P mode (without--pull or --client options), which is useful for “dumb” tunnel scenarios similar to GRE.
Verify P2P NCP negotiation:
DATA_v2=1 and an AEAD cipher (AES-XXX-GCM or CHACHA20POLY1305) are shown.
Routing with DCO
The ovpn-dco kernel module uses the main kernel routing tables for forwarding decisions.Key differences
- Each client receives a VPN IPv4 and/or IPv6 address
- Additional IP ranges are routed to clients via the kernel routing table:
- No companion
--routeis needed for each--irouteunless you want to blackhole traffic when the client is disconnected - Internal routing is not available; use
iptablesorip rulefor filtering - Client-to-client behavior differs: packets always reach the tunnel interface and are re-routed based on the system routing table
Cipher support
DCO only supports AEAD ciphers:- ChaCha20-Poly1305
- AES-128-GCM
- AES-192-GCM
- AES-256-GCM
On Windows, ChaCha20-Poly1305 support requires Windows 11.
Limitations
By design
- Layer 2 (dev tap) - Only
dev tunis supported - Compression - Use
--compress migrateto transition away from compression - Legacy ciphers - Only AEAD ciphers are supported
- Traffic shaping - Use
tcinstead of--shaper - Packet manipulation - Use
nftables/iptablesinstead - Topology - Only
topology subnetis supported for servers - Old clients - OpenVPN 2.4.0+ is required (for AEAD cipher support)
Current implementation
These limitations may be addressed in future releases:--persist-tunis not fully tested- IPv6 mapped IPv4 addresses require Linux 5.4.189+/5.10.110+/5.12+
- Some incompatible options may not properly fall back to non-DCO