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

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

我到处寻找解决这个问题的方法,但似乎什么也没找到。

[unix 上的 x-post]。不使用网络管理器,tcpdump 显示数据包正常到达。

客户端我收到了这个非常通用的错误:

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

如有任何建议,我们将不胜感激。

相关内容