openvpn在archlinux上安装默认为最新版,对于一些比较老旧的ovpn配置会连接不上,例如以下实际碰到的例子

DCO 不适配

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
❯ openvpn --config ./twb2026-team22.ovpn
2026-08-13 09:37:54 Note: --cipher is not set. OpenVPN versions before 2.5 defaulted to BF-CBC as fallback when cipher negotiation failed in this case. If you need this fallback please add '--data-ciphers-fallback BF-CBC' to your configuration and/or add BF-CBC to --data-ciphers. E.g. --data-ciphers DEFAULT:BF-CBC
2026-08-13 09:37:54 OpenVPN 2.7.6 [git:makepkg/327a33de2aa21883+] x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] [DCO] built on Aug 6 2026
2026-08-13 09:37:54 library versions: OpenSSL 3.6.3 9 Jun 2026, LZO 2.10
2026-08-13 09:37:54 DCO version: 7.1.8-1-cachyos #1 SMP PREEMPT_DYNAMIC Tue, 11 Aug 2026 09:10:42 +0000
2026-08-13 09:37:54 TCP/UDP: Preserving recently used remote address: [AF_INET]61.132.48.218:30022
2026-08-13 09:37:54 Attempting to establish TCP connection with [AF_INET]61.132.48.218:30022
2026-08-13 09:37:54 TCP connection established with [AF_INET]61.132.48.218:30022
2026-08-13 09:37:54 TCPv4_CLIENT link local: (not bound)
2026-08-13 09:37:54 TCPv4_CLIENT link remote: [AF_INET]61.132.48.218:30022
2026-08-13 09:37:54 [twb2026.xctf.org.cn] Peer Connection Initiated with [AF_INET]61.132.48.218:30022
2026-08-13 09:37:54 Compression or compression stub framing is not allowed since data-channel offloading is enabled.
2026-08-13 09:37:54 OPTIONS ERROR: server pushed compression settings that are not allowed and will result in a non-working connection. See also allow-compression in the manual.
2026-08-13 09:37:54 ERROR: Failed to apply push options
2026-08-13 09:37:54 Failed to open tun/tap interface
2026-08-13 09:37:54 SIGUSR1[soft,process-push-msg-failed] received, process restarting
2026-08-13 09:37:56 TCP/UDP: Preserving recently used remote address: [AF_INET]61.132.48.218:30022
2026-08-13 09:37:56 Attempting to establish TCP connection with [AF_INET]61.132.48.218:30022
2026-08-13 09:37:56 TCP connection established with [AF_INET]61.132.48.218:30022
2026-08-13 09:37:56 TCPv4_CLIENT link local: (not bound)
2026-08-13 09:37:56 TCPv4_CLIENT link remote: [AF_INET]61.132.48.218:30022
2026-08-13 09:37:56 [twb2026.xctf.org.cn] Peer Connection Initiated with [AF_INET]61.132.48.218:30022
2026-08-13 09:37:56 Compression or compression stub framing is not allowed since data-channel offloading is enabled.

报错提示说 archlinux openvpn 版本为2.7.6。默认开启 DCO(Data Channel Offload),DCO不支持 compression framing。根据官方文档提示--disable-dco可以让 Linux 使用传统 tun 模式,从而兼容老版本服务器。

1
sudo openvpn --config ./twb2026-team22.ovpn --disable-dco

老版本-特指鹏程实验室

1
2
3
4
5
6
sudo openvpn --config openvpn-xxx.ovpn \
--providers legacy default \
--tls-cert-profile insecure \
--tls-version-min 1.0 \
--data-ciphers BF-CBC \
--data-ciphers-fallback BF-CBC