0

I'm trying to connect to my OpenVPN Server and I'm getting a timeout when connecting, I've tried through a Linux client and it times out with the log error:

root@XXXX:~# sudo openvpn --config /XXXX.ovpn
Tue Mar 12 11:38:20 2019 OpenVPN 2.4.7 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Feb 20 2019
Tue Mar 12 11:38:20 2019 library versions: OpenSSL 1.1.1a  20 Nov 2018, LZO 2.10
Tue Mar 12 11:38:20 2019 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Tue Mar 12 11:38:20 2019 Outgoing Control Channel Authentication: Using 256 bit message hash 'SHA256' for HMAC authentication
Tue Mar 12 11:38:20 2019 Incoming Control Channel Authentication: Using 256 bit message hash 'SHA256' for HMAC authentication
Tue Mar 12 11:38:20 2019 TCP/UDP: Preserving recently used remote address: [AF_INET]X.X.X.X:1194
Tue Mar 12 11:38:20 2019 Socket Buffers: R=[87380->87380] S=[16384->16384]
Tue Mar 12 11:38:20 2019 Attempting to establish TCP connection with [AF_INET]X.X.X.X:1194 [nonblock]
Tue Mar 12 11:40:20 2019 TCP: connect to [AF_INET]X.X.X.X:1194 failed: Connection timed out
Tue Mar 12 11:40:20 2019 NOTE: UID/GID downgrade will be delayed because of --client, --pull, or --up-delay
Tue Mar 12 11:40:20 2019 SIGUSR1[connection failed(soft),init_ins

My OpenVPN server is behind a router and I have configured it so that the traffic coming from internet in port 1194, redirects to the internal IP of the server. Besides science my ISP has a dinamic IP, I've set in my client conf a Dyndns name so that the client can connect to my router.

  • To see if you can reach the server at all, you can test the connection from the client by giving the command echo -e "\x38\x01\x00\x00\x00\x00\x00\x00\x00" | timeout 10 nc -u [address of your openvpn server] [port] | od -x -N 14 If it's reachable, the server will echo back some hex packets like 0000000 7b40 fbec ddb6 db32 00e4 0000 0000 0000016 If nothing bounces back, your server is not reachable. – Organic Marble Mar 12 at 17:59
  • @OrganicMarble thanks, the response was 000000 – flatoveloz Mar 12 at 18:40
  • Why do you use a TCP connection? – vidarlo Mar 12 at 18:44
  • Because UDP didn't do the trick – flatoveloz Mar 12 at 18:45
  • Since you can reach the server, I suspect that your client and server options are not identical. I'd check that over carefully. – Organic Marble Mar 12 at 19:00

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.