Why is my OpenVPN Client not connecting to the server? Amazon EC2 Windows
You can ignore the thing about port forwarding. That's in a situation where you have the OpenVPN server behind some sort of router. In that case, you'll have to forward 1194/udp traffic to the server.
Can you make sure the clocks on both machines are in sync?
The other thing would be to double check the EC2 Security Groups to make sure you're allowing incoming 1194/udp traffic.
Related videos on Youtube
npiani
Updated on September 18, 2022Comments
-
npiani over 1 year
I have been trying to set up OpenVPN on an Amazon EC2 instance running Windows 2008 SQL Server. After following several tutorials, I have been able to get the server running. Here is my server conf file:
## server.ovpn ## port 1194 proto udp dev tun ca xxxx.crt cert xxxx.crt key xxxx.key dh dh2048.pem server 10.8.0.0 255.255.255.0 ifconfig-pool-persist ipp.txt keepalive 10 120 comp-lzo max-clients 100 persist-key persist-tun status openvpn-status.log verb 3
But when setting up the client side, the connection times out giving the following error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
I have tried a TCP connection instead to no avail, and I opened the 1194 port on the EC2 firewall. Both internally and on the security settings of the EC2 instance.
The OpenVPN HOWTO says to make sure I am are using a correct port forward rule on the server's gateway firewall. But I am not sure what that means exactly.
Thanks in advance. I will post my client conf file as well just in case.
client dev tun proto udp remote "Amazon instance Elastic IP" 1194 resolv-retry infinite nobind persist-key persist-tun ca xxxx.crt cert xxxx.crt key xxxx.key ns-cert-type server comp-lzo verb 3
-
npiani about 12 yearsThank you cjc, The clocks were not in sync and that seemed to be the issue.