2

I've looked all over for a solution to this, and I can't seem to find anything.

[x-post from unix]. Not using network-manager, tcpdump reveals packets are arriving fine.

Client side I am receiving this very generic error:

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

Server side is more verbose. Currently I am getting the following error:

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'

To configure the server, I used this: https://github.com/pl48415/openvpn-install-advanced

The script has worked fine for me in the past (also on 14.04 systems). Only this particular server is causing issues.

Interestingly, disabling tls-auth (both server and client side) as suggested by many other posters will only yield this error:

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'

The following are my config files:

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

Any suggestions would be very much appreciated.

3
  • have you tried starting it without HMAC? Dec 23 '16 at 16:21
  • I assume one simply does this by removing the tls-auth lines in both files. I also reinstalled openvpn without ever enabling tls-auth. Both achieve the same result mentioned in the post, "TLS Error: cannot locate HMAC in incoming packet".
    – MacroPower
    Dec 23 '16 at 19:47
  • I will recommend trying this (very basic setup), and then adapt it to get what you want, I can help you adapting it: openvpn.net/index.php/open-source/documentation/… Dec 24 '16 at 0:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.