尽管客户端和服务器配置看似相同,但 OpenVPN HMAC 身份验证失败

尽管客户端和服务器配置看似相同,但 OpenVPN HMAC 身份验证失败

我已经到处寻找解决方案,但似乎找不到任何东西。

客户端我收到这个非常普遍的错误:

Wed Dec 21 16:26:17 2016 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Wed Dec 21 16:26:17 2016 TLS Error: TLS handshake failed

服务器端更详细。目前我收到以下错误:

2016-12-21 13:19:38-0800 [-] OVPN 10 OUT: 'Wed Dec 21 21:19:38 2016 Authenticate/Decrypt packet error: packet HMAC authentication failed'
2016-12-21 13:19:38-0800 [-] OVPN 10 OUT: 'Wed Dec 21 21:19:38 2016 TLS Error: incoming packet authentication failed from [AF_INET]<client public IP>:63413'

为了配置服务器,我使用了这个:https://github.com/pl48415/openvpn-install-advanced

该脚本过去对我来说运行良好(也在 14.04 系统上)。只有这个特定的服务器会导致问题。

有趣的是,按照许多其他发帖者的建议禁用 tls-auth (服务器端和客户端)只会产生此错误:

2016-12-21 12:22:47-0800 [-] OVPN 10 OUT: 'Wed Dec 21 20:22:47 2016 TLS Error: cannot locate HMAC in incoming packet from [AF_INET]<client public IP>:56375'

以下是我的配置文件:

client
dev tun
cipher AES-256-CBC
auth SHA256
proto udp
remote [DDNS Domain] 1194
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
tls-client
comp-lzo
verb 3
<ca>
-----BEGIN CERTIFICATE-----
[Redacted]
-----END CERTIFICATE-----
</ca>
<cert>
[Redacted]
-----BEGIN CERTIFICATE-----
[Redacted]
-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN PRIVATE KEY-----
[Redacted]
-----END PRIVATE KEY-----
</key>
key-direction 1
<tls-auth>
-----BEGIN OpenVPN Static key V1-----
[Redacted - Identical to server key.]
-----END OpenVPN Static key V1-----
</tls-auth>

--

local 192.168.1.2
port 1194
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key
dh dh.pem
push "register-dns"
topology subnet
server 10.8.0.0 255.255.255.0
cipher AES-256-CBC
auth SHA256
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1 bypass-dhcp"
tls-auth /etc/openvpn/easy-rsa/pki/private/ta.key 0
mode server
tls-server
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
keepalive 10 120
comp-lzo
persist-key
persist-tun
status openvpn-status.log
verb 3
crl-verify /etc/openvpn/easy-rsa/pki/crl.pem
client-to-client

任何建议将不胜感激。

相关内容