OpenVPN DCO¶
OpenVPN DCO (Data Channel Offload) is an acceleration feature of OpenVPN. If a device uses this feature, the encryption and decryption of data packets are handled inside the kernel instead of in the user-space OpenVPN process, which greatly improves VPN throughput and reduces CPU usage on that device.
This article explains what OpenVPN DCO is, how it works on GL.iNet routers, and how to check whether a device supports it.
1. What is OpenVPN DCO¶
An OpenVPN connection consists of two parts:
-
Control channel – TLS handshake, authentication, key negotiation and session management.
-
Data channel – encryption, decryption and forwarding of every packet that goes through the tunnel.
Traditionally both parts run in the user-space openvpn process. Every packet has to be copied from the kernel to the OpenVPN process, encrypted or decrypted there, then copied back to the kernel and forwarded. This double copy plus a single-threaded processing path is the main reason why OpenVPN throughput is usually limited to a few hundred Mbps, even on fast hardware.
OpenVPN DCO (Data Channel Offload, also written as ovpn-dco) moves the data channel into the kernel, using a dedicated kernel module. The user-space openvpn process keeps only the control channel and acts as a control plane application:
-
Packets are encrypted, decrypted and forwarded directly in kernel space, without the round trip to the user-space process.
-
The work can be spread across multiple CPU cores, so throughput is no longer limited by a single process.
-
Certificates, authentication and Perfect Forward Secrecy work as before. The data channel must use a supported AEAD cipher.
The table below summarizes the difference:
| OpenVPN without DCO | OpenVPN with DCO | |
|---|---|---|
| Data channel | User space (openvpn process) |
Kernel space (DCO kernel module) |
| Control channel | User space | User space (unchanged) |
| Packet copies | Kernel to user space and back | Minimal, handled inside the kernel |
| Multi-core usage | Single-threaded, limited to one CPU core | Parallel, spread across multiple CPU cores |
| Data channel cipher | AEAD and compatible non-AEAD ciphers | AEAD only, such as AES-GCM or CHACHA20-POLY1305 |
| Typical throughput | Hundreds of Mbps | Up to several Gbps, depending on hardware |
OpenVPN DCO requires OpenVPN 2.6.0 or later and a matching DCO kernel module. If the configuration contains an option that cannot coexist with DCO, such as compression, OpenVPN can disable DCO and use the classic user-space data channel.
2. OpenVPN DCO on GL.iNet routers¶
2.1 Benefits¶
On a GL.iNet router, OpenVPN DCO is a firmware-level feature, not an extra package you install. Once the router runs a firmware that includes it and the tunnel negotiated with the peer is compatible with DCO, the router handles the data channel in the kernel.
The benefits are:
-
Much higher OpenVPN throughput. Depending on the model, OpenVPN speed can reach several hundred Mbps and up to 1.5 Gbps, which makes OpenVPN practical on gigabit broadband.
-
Lower CPU load and lower latency. Encryption no longer occupies the whole CPU, so the router stays responsive and other features (Wi-Fi, ad blocking, traffic statistics) are not affected.
-
Better stability for long sessions. Kernel-space processing avoids the bottlenecks of the user-space process under heavy traffic, which is helpful for site-to-site links and always-on tunnels.
DCO applies both when the GL.iNet router works as an OpenVPN client (connecting to a VPN service or a remote server) and when it works as an OpenVPN server (accepting connections from remote clients).
OpenVPN speed also depends on the peer device. If the other end does not support DCO, it processes packets in user space, and the tunnel speed is limited by that end.
2.2 Supported models¶
OpenVPN DCO is available on the GL.iNet routers that can be upgraded to firmware v4.8 or later. These models already ship with OpenVPN 2.6.0 or above, which is the minimum version required for DCO.
Supported Models
- GL-MT6000 (Fortify)
- GL-MG1300 (Mango 2)
- GL-BE14000 (Flint 4)
- GL-BE10000 (Slate 7 Pro)
- GL-E5800 (Mudi 7)
- GL-MT3600BE (Beryl 7)
- GL-MT5000 (Brume 3)
- GL-BE6500 (Flint 3e)
- GL-BE9300 (Flint 3)
- GL-BE3600 (Slate 7)
- GL-MT6000 (Flint 2)
- GL-AX1800 (Flint)
- GL-X3000 (Spitz AX)
- GL-XE3000 (Puli AX)
- GL-MT3000 (Beryl AX)
- GL-AXT1800 (Slate AX)
- GL-SFT1200 (Opal)
- ※ GL-X2000 (Spitz Plus)
- ※ GL-MT2500/GL-MT2500A (Brume 2)
- ※ GL-E750/E750V2 (Mudi)
Note: Models marked with ※ support OpenVPN DCO in Beta firmware v4.8.2 or later.
Unsupported Models
- GL-B3000 (Marble)
- GL-A1300 (Slate Plus)
- GL-MT1300 (Beryl)
- GL-AR750S (Slate)
- GL-XE300 (Puli)
- GL-X750 (Spitz)
- GL-MT300N-V2 (Mango)
- GL-AR300M Series (Shadow)
- GL-B1300 (Convexa-B)
- GL-X300B (Collie)
- GL-AP1300 (Cirrus)
2.3 How to enable it¶
On supported GL.iNet routers, OpenVPN DCO is built into the firmware and is used automatically.
In practice, as long as your GL.iNet router meets all the requirements below, DCO is used automatically on the router side whenever an OpenVPN tunnel is established. Whether the peer also uses DCO is a separate check on the peer's own side; see 3.2 Compatibility check.
- Use a supported model. See 2.2 Supported models.
- Upgrade the firmware to v4.8 or later.
- Set up the OpenVPN client or OpenVPN server on the GL.iNet router.
- Use Tun mode with a matching TUN client profile. Keep the default AES-256-GCM cipher or use another supported AEAD cipher such as CHACHA20-POLY1305, and check the profile for DCO-incompatible options such as
compressordisable-dco.
3. OpenVPN DCO on other devices¶
3.1 Typical scenario¶
A typical scenario is to use the GL.iNet router as an OpenVPN server (at home, in the office, or on a travel router with a public IP), and then import the exported client configuration file into another device that also supports OpenVPN DCO, for example:
-
another GL.iNet router, used as the client of the site-to-site or remote-access tunnel;
-
a Linux PC, mini PC or x86 server running OpenVPN 2.6.0 or later with the DCO kernel module;
-
any other router, NAS or appliance whose firmware ships OpenVPN 2.6.0+ with DCO enabled.
3.2 Compatibility check¶
Make sure the peer device meets all the conditions below.
Condition 1: OpenVPN 2.6.0 or later with matching DCO kernel support
Run the following command on the device:
openvpn --version
The version number must be 2.6.0 or higher, the OpenVPN build must include DCO support, and a matching DCO kernel module must be available for the running kernel. The version number alone is not sufficient.
In OpenVPN 2.6, the [DCO] marker in the version output indicates that the OpenVPN build includes DCO support; it does not by itself confirm that the kernel module is available or that the tunnel uses DCO.
On Linux, start the tunnel and check the OpenVPN startup log. A message such as DCO device tun0 opened confirms that OpenVPN has opened a DCO interface (the interface name may differ). If the log reports "Kernel support for ovpn-dco missing, disabling data channel offload", the required kernel support is unavailable and DCO is disabled.
Condition 2: the cipher is AES-GCM or CHACHA20-POLY1305
DCO only supports AEAD ciphers. Check the data-ciphers / cipher setting in the server push or in the client profile:
data-ciphers AES-256-GCM:AES-128-GCM:CHACHA20-POLY1305
On a GL.iNet router, the default Encryption Algorithm is AES-256-GCM. For OpenVPN 2.6, check the endpoints' data-ciphers settings and verify that the tunnel negotiates a supported AEAD cipher.
If the tunnel is configured with an old cipher such as AES-256-CBC, DCO is not used.
Condition 3: the configuration has no option that is incompatible with DCO
Set Device Mode to Tun on the server and use a matching TUN client profile. Then check the local configuration at each endpoint and any options pushed by the server for settings that disable DCO:
-
disable-dco -
compress -
any other option that cannot coexist with DCO
If such an option is present, OpenVPN disables DCO automatically.
Quick checklist
| Check | Pass condition |
|---|---|
openvpn --version |
2.6.0 or above |
| DCO support | OpenVPN build includes DCO support and a matching kernel module is available; startup logs confirm DCO use |
| Data cipher | AES-GCM or CHACHA20-POLY1305 |
| Server push / client profile | No disable-dco, no compress, no other DCO-incompatible option |
3.3 Setup steps¶
The steps are the same whichever device you use as the client:
- On the GL.iNet router, go to VPN -> OpenVPN Server. Click Generate Configuration for initial setup, ensure the Device Mode is TUN and the Encryption Algorithm is AES-256-GCM, then click Export Client Configuration.
- Start the OpenVPN Server.
- Import this
.ovpnfile (together with the credentials, if any) into the other device. - Start the tunnel. Each device checks the conditions in 3.2 Compatibility check on its own side, and offloads the data channel to the kernel when they are met.
Things to keep in mind:
- Each endpoint checks its own setup. The OpenVPN client and server each need local DCO support and compatible tunnel settings.
- Each endpoint offloads independently. A device uses DCO when its own setup and the negotiated tunnel settings are compatible. If the peer does not support DCO, the tunnel is still established normally, but the peer processes packets in user space, which caps the overall speed; your side keeps its offload.
- Public VPN services often do not use DCO. Many commercial providers have not enabled it on their servers. Your router can still offload its own side, but the tunnel speed is then capped by the provider's user-space server. If you want both sides to offload, a self-hosted server (for example a GL.iNet router) is the reliable choice.
Related Articles:
- OpenVPN Client
- OpenVPN Server
- OpenVPN data channel offload (official README)
- OpenVPN Data Channel Offload: Unleashing Superior VPN Performance
Still have questions? Visit our Community Forum or Contact us.