我有一个新的 OpenVPN 配置,它在服务器上运行正常,但客户端无法连接,并出现以下错误:
选项错误:/Library/Application Support/Tunnelblick/Users/Mark/markhorrocks.tblk/Contents/Resources/config.ovpn:28: tls-crypt (2.3.17) 中无法识别的选项或缺少的参数
隧道检查日志:
*Tunnelblick:OS X 10.12.5;Tunnelblick 3.7.2beta03(内部版本 4840);先前版本 3.7.2beta02(内部版本 4830)2017-07-06 23:54:08 *Tunnelblick:尝试使用卷影副本连接 markhorrocks;设置名称服务器 = 771;监控连接 2017-07-06 23:54:08 *Tunnelblick:openvpnstart 启动 markhorrocks.tblk 1337 771 0 1 0 1065264 -ptADGNWradsgnw 2.3.17-openssl-1.0.2k 2017-07-06 23:54:08 *Tunnelblick:
无法启动 OpenVPN(openvpnstart 返回状态 #251)
openvpnstart 日志的内容:*Tunnelblick:openvpnstart 日志:警告:Tunnelblick 正在使用“openvpn-down-root.so”,因此将不使用 route-pre-down 脚本。您可以通过在 Tunnelblick VPN 配置中提供自定义 route-pre-down 脚本(可能是 Tunnelblick 标准 route-pre-down 脚本的副本)来覆盖此脚本。但是,除非从 OpenVPN 配置文件中删除“用户”和“组”选项,否则不会以 root 身份执行该脚本。如果删除了“用户”和“组”选项,则无需使用自定义 route-pre-down 脚本。OpenVPN 返回状态为 1,errno = 0:未定义错误:0
Command used to start OpenVPN (one argument per displayed line): /Applications/Tunnelblick.app/Contents/Resources/openvpn/openvpn-2.3.17-openssl-1.0.2k/openvpn --daemon --log /Library/Application Support/Tunnelblick/Logs/-SUsers-SMark-SLibrary-SApplication
Support-STunnelblick-SConfigurations-Smarkhorrocks.tblk-SContents-SResources-Sconfig.ovpn.771_0_1_0_1065264.1337.openvpn.log --cd /Library/Application Support/Tunnelblick/Users/Mark/markhorrocks.tblk/Contents/Resources --verb 3 --config /Library/Application Support/Tunnelblick/Users/Mark/markhorrocks.tblk/Contents/Resources/config.ovpn --verb 3 --cd /Library/Application Support/Tunnelblick/Users/Mark/markhorrocks.tblk/Contents/Resources --management 127.0.0.1 1337 --management-query-passwords --management-hold --script-security 2 --up /Applications/Tunnelblick.app/Contents/Resources/client.up.tunnelblick.sh -9 -d -f -m -w -ptADGNWradsgnw --plugin /Applications/Tunnelblick.app/Contents/Resources/openvpn/openvpn-2.3.17-openssl-1.0.2k/openvpn-down-root.so /Applications/Tunnelblick.app/Contents/Resources/client.down.tunnelblick.sh -9 -d -f -m -w -ptADGNWradsgnw
Contents of the OpenVPN log: Options error: Unrecognized option or missing parameter(s) in /Library/Application
Support/Tunnelblick/Users/Mark/markhorrocks.tblk/Contents/Resources/config.ovpn:28: tls-crypt (2.3.17) 使用 --help 获取更多信息。
More details may be in the Console Log's "All Messages"
================================================================================
“净化”的完整配置文件
client
proto udp
dev tun
remote vpn.mydomain.com 1194
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
auth SHA512
cipher AES-256-GCM
tls-version-min 1.2
tls-client
ping 15
ping-restart 120
route 10.0.0.0 255.0.0.0
route-nopull
daemon
# Downgrade privileges after initialization (non-Windows only)
user nobody
group nogroup
<ca>
[Security-related line(s) omitted]
</ca>
<cert>
[Security-related line(s) omitted]
</cert>
<key>
[Security-related line(s) omitted]
</key>
<tls-crypt>
[Security-related line(s) omitted]
</tls-crypt>
答案1
OpenVPN 在 2.4+ 版本中添加了 tls-crypt 功能。出于某种原因,Tunnelblick 在设置中默认使用 OpenVPN 2.3.7,即使在最新版本中也是如此(就我的经验而言)。因此,只需将 Tunnelblick 的“设置”菜单中的“OpenVPN”版本更新为 2.4+,您就可以开始了!