About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.
The client message is TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity), which can be followed by TLS Error: TLS handshake failed. It means the client sent its TLS handshake and did not complete it within the handshake window. Causes include the two ends disagreeing on protocol or port, a firewall dropping the packets, or a control-channel key (tls-auth or tls-crypt) that differs. The client log cannot tell you which. The server log, and a packet capture, can.
What the error means
OpenVPN sets up a TLS session on its control channel before any tunnel data flows. The manual's --hand-window option sets how long that takes: "the TLS-based key exchange must finalize within n seconds of handshake initiation by any peer (default 60 seconds). If the handshake fails we will attempt to reset our connection with our peer and try again." So the 60 in the message is that default. If someone set hand-window to another value, the number in your message will match it.
In the 2.6 source, the message is logged when the time allowed for negotiation passes before the session becomes active, and the number printed is the configured handshake window. It is logged at the level the source calls D_TLS_ERRORS, which the source defines as level 1, so it shows at the default verbosity. The manual says --verb defaults to 1 and that level 3 "is recommended if you want a good summary of what's happening without being swamped by output."
The client keeps sending control packets while it waits. The manual says --tls-timeout is the "Packet retransmit timeout on TLS control channel if no acknowledgment from remote within n seconds (default 2)", with exponential backoff. If nothing is ever acknowledged, you wait the whole window.
The important point is where the fault is. If packets never arrive, the server logs nothing. If they arrive and fail authentication, the server logs why.
Likely causes
| Cause | What you see | How to confirm |
|---|---|---|
| Protocol mismatch (UDP on one end, TCP on the other) | Server shows nothing from this client. The 60-second message for this case has not been verified against a source, and a TCP client against a UDP server may fail earlier with a different message | Compare proto and the third field of remote on the client with proto on the server |
| Port mismatch or port blocked | Same as above; capture on the server sees no packets | ss on the server, tcpdump on the server port |
tls-auth key or direction differs |
Server log: TLS Error: incoming packet authentication failed from followed by the client's address |
Compare the key file and the direction (key-direction or the 0/1 argument) on both ends |
The server has tls-crypt and the client does not, or uses a different key |
Server log: TLS Error: tls-crypt unwrapping failed from |
Compare tls-crypt lines and key files. If only the client has tls-crypt, the server log line is not documented in the sources read, so read the whole server log around the attempt |
Server expects tls-crypt-v2 and the client sends none |
Server log: TLS Error: could not determine wrapping from |
Check for tls-crypt-v2 on the server and the client |
| Server not running or listening somewhere else | Capture shows packets arriving at the host; no OpenVPN socket on that port | ss -ulnp or ss -tlnp on the server |
Prove the cause before changing anything
Start with what the client is configured to do, then the server, then the wire.
On the client, look at these lines in the configuration file: proto, remote, port, tls-auth, tls-crypt, tls-crypt-v2, key-direction. The manual says the remote directive takes "host port proto", where port and proto are optional. The default protocol is udp, and the default port is 1194, "the official IANA port number assignment for OpenVPN." The TLS Error lines already show at the default --verb 1; use --verb 3 on the next attempt only if you want the manual's "good summary of what's happening".
On the server, check the same lines, and confirm OpenVPN is listening:
ss -ulnp
ss -tlnp
In the ss manual, -l shows listening sockets, -n shows numeric ports, -p shows the processes, -u selects UDP and -t selects TCP. Look for the OpenVPN process on the port you expect, for the protocol you expect.
Then capture on the server, while the client retries:
tcpdump -n -i eth0 udp port 1194
-n and -i are the tcpdump manual's no-resolve and interface options, and udp port is a pcap-filter expression. Use tcp port if you run TCP, and use your own interface and port.
- No packets from the client: the path is blocked, the client points at the wrong address or port, or the protocol differs from what the server listens for.
- Packets arrive, nothing replies, and the server log shows an authentication line: the control-channel keys differ.
- Packets arrive and the server logs nothing:
TLS Errorlines are level 1 and would already show, so raise the server's--verbto 3 and try again to see what else the server does with the packets.
The tls-auth manual entry explains why the failure is silent to the client. It enables "a kind of 'HMAC firewall' on OpenVPN's TCP/UDP port, where TLS control channel packets bearing an incorrect HMAC signature can be dropped immediately without response." The client gets silence, and waits out the 60 seconds. The manual also says --tls-crypt "does not require the user to set --key-direction", and that for --tls-auth or --secret the direction "should always be complementary on either side of the connection, i.e. one side should use 0 and the other should use 1, or both sides should omit it altogether."
Example (illustrative): laptop01 connects to vpn01.example.com with remote vpn01.example.com 1194 udp. The client times out with the 60-second message. On vpn01, ss -ulnp shows the OpenVPN process listening on UDP 1194. tcpdump -n -i eth0 udp port 1194 shows packets arriving from 198.51.100.10. The server log has TLS Error: tls-crypt unwrapping failed from followed by the client's address and port. The server config has tls-crypt and the client has tls-auth with the same key file. The ends are using different control-channel protection, so the server drops the client's packets. Changing the client to tls-crypt with the same key file fixes it.
Fix
Change the end that is wrong, and change one thing at a time.
Save first. Copy the configuration file and any key file you will replace, on the end you are changing, using your own file names:
cp server.conf server.conf.bak-YYYYMMDD
cp shared.key shared.key.bak-YYYYMMDD
Protocol and port
Make both ends agree. For UDP, the manual says "--proto udp should be specified on both peers." For TCP, "one peer must use --proto tcp-server and the other must use --proto tcp-client." The client's remote line can carry the protocol: remote server2.example.net 1194 tcp, as in the manual's examples. Then allow the port through every firewall layer between them: the host firewall, a cloud security group, and any network ACL.
Risk: a firewall, security group or network ACL change applies to everything the rule covers, not only OpenVPN. A rule that is too wide opens more than the one port, and a mistaken change to an existing rule can cut your own access. Open the one port for the protocol in use, keep a console or an out-of-band route, record the rule set before the change, and back out by removing the rule you added or restoring the recorded set.
tls-auth or tls-crypt
Both ends must use the same method and the same key file. The manual describes tls-auth as "an additional layer of HMAC authentication on top of the TLS control channel", and tls-crypt as encrypting and authenticating all control-channel packets. They are not interchangeable. Compare the key files by copying the same file to both ends and checking they match, then make the direction lines complementary or omitted.
If the key must be replaced, the manual shows the generator: openvpn --genkey tls-crypt shared.key.
Disruptive step: with tls-crypt or tls-auth, all peers share one group key (the manual says "All peers use the same --tls-crypt pre-shared group key"). Replacing it on the server cuts off every client until each has the new file. Back out by restoring the old key file on the server and restarting OpenVPN. For large setups the manual says to consider --tls-crypt-v2, which uses per-client keys.
Apply the change
Check the edited file before the restart. The OpenVPN 2.6 manual documents no option that only checks a configuration file, so the program's own check is its start-up: it reads the file when it starts and reports an error for a line it cannot accept. Re-read every line you changed against the manual, keep the saved copy to hand, and read the service log straight after the restart.
Restart OpenVPN the way your system runs it (for example its service unit) after editing the server file, and restart the client. Risk: changing proto, port, the key or the key direction on the server strands every client until its own file matches. Back out by restoring the previous server file and restarting. Restarting the server disconnects every connected client for the duration, and they rely on their own reconnect behaviour. Back out by restoring the previous config and restarting again. After the restart, test with one client and look for the handshake completing in its log.
Still silent
If a capture shows packets arriving at the server and nothing in the server log even at --verb 3, then check whether the packets reach the OpenVPN process at all: look for a different listener on the port, a local firewall rule, or a port share (in TCP server mode, --port-share hands connections that are not OpenVPN to another server). The manual also documents --fragment and --mssfix for packet-size problems. No source read ties either option to this message, so treat packet size as a possibility to test only after the checks above.
Confirm the fix
- The client log passes the handshake, with no
TLS Errorlines after the change. tcpdumpon the server shows replies leaving as well as packets arriving.- Traffic passes through the tunnel, for example a ping to a server-side address. A handshake that completes and then drops traffic is a different fault; see "IPsec VPN Tunnel Up but No Traffic: Read-Only Diagnosis" for the approach, which applies to any tunnel.
- A second client with the same settings also connects.
What to watch afterwards
- The server log at default verbosity for
TLS Errorlines. They are logged at level 1, so a log shipper can alert on them. - Key rotation records: which clients hold which key file.
- Firewall changes on the OpenVPN port.
- Connection retries from clients, controlled by
--connect-retry(the manual's default is a 1-second wait, slowed after 5 retries).
Read next
Related articles you may want next.
- TroubleshootingWireGuard "handshake did not complete": find which side is wrongWireGuard handshake did not complete after 5 seconds? Compare wg show on both ends, capture the UDP port, check public keys and endpoint, then AllowedIPs.Read article
- TroubleshootingIPsec VPN Tunnel Up but No Traffic: Read-Only DiagnosisAn IKEv2 tunnel can be up while no data flows. Check child SAs, selectors, NAT, routing and packet size on both strongSwan gateways before any change.Read article
- HostingValidating firewall changes for hosted application dependenciesHow to baseline required ports for hosted applications and verify connectivity after routine firewall rule changes—not post-incident policy restore.Read article
Risks and limits
- These commands have not been run or lab-tested. They are taken from the OpenVPN 2.6 manual, the 2.6 source and the manual pages cited in Sources.
- Exact log wording differs between OpenVPN versions and between the community edition and vendor products. Check yours at
--verb 3. - The statement that the server logs these lines comes from the source of the 2.6 branch; whether it appears depends on your server's version and its verbosity.
- Only the control channel handshake is covered here. Certificate errors, such as an expired certificate or an untrusted CA, produce different messages in the same log.
- Never email key files. Move them over a secure channel.
Sources
- OpenVPN 2.6 Manual — OpenVPN, no date shown, accessed 18 November 2026
- ssl.c, release/2.6 branch — OpenVPN project source, no date shown, accessed 18 November 2026
- ssl_pkt.c, release/2.6 branch — OpenVPN project source, no date shown, accessed 18 November 2026
- errlevel.h, release/2.6 branch — OpenVPN project source, no date shown, accessed 18 November 2026
- ss(8) — Linux man-pages project, page obtained 2026-08-04, accessed 18 November 2026
- tcpdump(1) (page shows "Updated: 10 September 2026") and pcap-filter(7) (page shows "Updated: 16 September 2026") — tcpdump project, accessed 18 November 2026
This article was originally published on .