问题原文
原帖链接 · vmasanas · CC BY-SA 3.0
I'm configuring an OpenVPN (version 2.3.10) server on a Windows 2012 server but I cannot make it to work.
The server is behind a router and I opened the 1194 port and created a rule to forward traffic on this port to the server.
Here is the log I see on the server when I try to connect from a client:
Mon Mar 21 11:11:47 2016 XX.XX.XX.XX:57804 TLS: Initial packet from [AF_INET]XX.XX.XX.XX:57804, sid=fdf7a7ac 0264c7f3
Mon Mar 21 11:12:38 2016 XX.XX.XX.XX:55938 TLS: Initial packet from [AF_INET]XX.XX.XX.XX:55938, sid=1f242a3f e454a525
Mon Mar 21 11:12:48 2016 XX.XX.XX.XX:57804 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Mon Mar 21 11:12:48 2016 XX.XX.XX.XX:57804 TLS Error: TLS handshake failed
Mon Mar 21 11:12:48 2016 XX.XX.XX.XX:57804 SIGUSR1[soft,tls-error] received, client-instance restarting
Where XX.XX.XX.XX is the ip of the client. So I understand from this that the client at least is able to arrive at the server, so there's no routing or firewall issues.
I followed the description provided here Easy Windows Guide Any ideas?
社区高分解答
原帖链接 · mwfearnley · CC BY-SA 4.0
I was getting TLS key negotiation timeouts like this. But in my case I realised that the remote link was a local IP address.
The VPN on our pfSense firewall had mistakenly been put on the LAN interface instead of the WAN interface, and so the exported config was set to try and connect to the firewall's LAN IP address - which was never going to work with the client naturally being on a different LAN.
I think the main takeaways from this are:
Getting a key negotiation timeout does not necessarily mean you've even managed to connect to anything.
So at this stage it may still be worth checking you're actually connecting to the right place, and there are no firewall rules blocking the connection, etc. Particularly if your configuration has been automatically generated.
Note that getting a login prompt does not mean that you're connected, since OpenVPN asks for your credentials before trying to connect.
Make sure your VPN server is listening on the right interface.
(Of course, this is one of a number of server-side misconfigurations that could occur, such as firewall rules, putting the wrong port number, intermixing TCP and UDP, etc.)
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
