server i klient znajdują się w tej samej sieci,
jest połączenie, ping, ale po chwili dostaje taki komunikat:
TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
log z klienta wygląda tak:
Kod: Zaznacz cały
Mon Sep 26 15:42:47 2016 Control Channel Authentication: using '/etc/openvpn/ta.key' as a OpenVPN static key file
Mon Sep 26 15:42:47 2016 Outgoing Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Mon Sep 26 15:42:47 2016 Incoming Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Mon Sep 26 15:42:47 2016 Socket Buffers: R=[212992->131072] S=[212992->131072]
Mon Sep 26 15:42:47 2016 NOTE: UID/GID downgrade will be delayed because of --client, --pull, or --up-delay
Mon Sep 26 15:42:47 2016 UDPv4 link local (bound): [undef]
Mon Sep 26 15:42:47 2016 UDPv4 link remote: [AF_INET]192.168.1.37:1194
Mon Sep 26 15:42:47 2016 TLS: Initial packet from [AF_INET]192.168.1.37:1194, sid=c20d12c1 e53683c8
Mon Sep 26 15:42:47 2016 VERIFY OK: depth=1, C=NL, ST=NH, L=DeRijp, O=Fort-Koper, OU=Koper, CN=server, name=Server, [email protected]
Mon Sep 26 15:42:47 2016 VERIFY OK: nsCertType=SERVER
Mon Sep 26 15:42:47 2016 VERIFY OK: depth=0, C=NL, ST=NH, L=DeRijp, O=Fort-Koper, OU=Koper, CN=server, name=Server, [email protected]
Mon Sep 26 15:42:49 2016 WARNING: 'link-mtu' is used inconsistently, local='link-mtu 1562', remote='link-mtu 1558'
Mon Sep 26 15:42:49 2016 WARNING: 'mtu-dynamic' is present in local config but missing in remote config, local='mtu-dynamic'
Mon Sep 26 15:42:49 2016 Data Channel Encrypt: Cipher 'AES-256-CBC' initialized with 256 bit key
Mon Sep 26 15:42:49 2016 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Mon Sep 26 15:42:49 2016 Data Channel Decrypt: Cipher 'AES-256-CBC' initialized with 256 bit key
Mon Sep 26 15:42:49 2016 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Mon Sep 26 15:42:49 2016 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 2048 bit RSA
Mon Sep 26 15:42:49 2016 [server] Peer Connection Initiated with [AF_INET]192.168.1.37:1194
Mon Sep 26 15:42:52 2016 SENT CONTROL [server]: 'PUSH_REQUEST' (status=1)
Mon Sep 26 15:42:52 2016 PUSH: Received control message: 'PUSH_REPLY,route 192.168.1.0 255.255.255.0,redirect-gateway local def1,dhcp-option DNS 8.8.8.8,dhcp-option DNS 8.8.4.4,route 10.0.0.1,topology net30,ping 10,ping-restart 120,ifconfig 10.0.0.5 10.0.0.6'
Mon Sep 26 15:42:52 2016 OPTIONS IMPORT: timers and/or timeouts modified
Mon Sep 26 15:42:52 2016 OPTIONS IMPORT: --ifconfig/up options modified
Mon Sep 26 15:42:52 2016 OPTIONS IMPORT: route options modified
Mon Sep 26 15:42:52 2016 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Mon Sep 26 15:42:52 2016 ROUTE_GATEWAY 192.168.1.254/255.255.255.0 IFACE=wlp6s0 HWADDR=00:1f:e1:9f:fc:30
Mon Sep 26 15:42:52 2016 TUN/TAP device tun0 opened
Mon Sep 26 15:42:52 2016 TUN/TAP TX queue length set to 100
Mon Sep 26 15:42:52 2016 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Mon Sep 26 15:42:52 2016 /sbin/ip link set dev tun0 up mtu 1500
Mon Sep 26 15:42:52 2016 /sbin/ip addr add dev tun0 local 10.0.0.5 peer 10.0.0.6
Mon Sep 26 15:42:52 2016 /sbin/ip route add 0.0.0.0/1 via 10.0.0.6
Mon Sep 26 15:42:52 2016 /sbin/ip route add 128.0.0.0/1 via 10.0.0.6
Mon Sep 26 15:42:52 2016 /sbin/ip route add 192.168.1.0/24 via 10.0.0.6
Mon Sep 26 15:42:52 2016 /sbin/ip route add 10.0.0.1/32 via 10.0.0.6
Mon Sep 26 15:42:52 2016 GID set to nogroup
Mon Sep 26 15:42:52 2016 UID set to nobody
Mon Sep 26 15:42:52 2016 Initialization Sequence Completed
Mon Sep 26 15:44:52 2016 [server] Inactivity timeout (--ping-restart), restarting
Mon Sep 26 15:44:52 2016 SIGUSR1[soft,ping-restart] received, process restarting
Mon Sep 26 15:44:52 2016 Restart pause, 2 second(s)
Mon Sep 26 15:44:54 2016 Socket Buffers: R=[212992->131072] S=[212992->131072]
Mon Sep 26 15:44:54 2016 UDPv4 link local (bound): [undef]
Mon Sep 26 15:44:54 2016 UDPv4 link remote: [AF_INET]192.168.1.37:1194
Mon Sep 26 15:45:54 2016 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Mon Sep 26 15:45:54 2016 TLS Error: TLS handshake failed
Mon Sep 26 15:45:54 2016 SIGUSR1[soft,tls-error] received, process restarting
Mon Sep 26 15:45:54 2016 Restart pause, 2 second(s)
Mon Sep 26 15:45:56 2016 Socket Buffers: R=[212992->131072] S=[212992->131072]
Mon Sep 26 15:45:56 2016 UDPv4 link local (bound): [undef]
Mon Sep 26 15:45:56 2016 UDPv4 link remote: [AF_INET]192.168.1.37:1194
Mon Sep 26 15:46:56 2016 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
na tronie openvpn.net znalazłem możliwe przyczyny:
A perimeter firewall on the server's network is filtering out incoming OpenVPN packets (by default OpenVPN uses UDP or TCP port number 1194).
A software firewall running on the OpenVPN server machine itself is filtering incoming connections on port 1194. Be aware that many OSes will block incoming connections by default, unless configured otherwise.
A NAT gateway on the server's network does not have a port forward rule for TCP/UDP 1194 to the internal address of the OpenVPN server machine.
The OpenVPN client config does not have the correct server address in its config file. The remote directive in the client config file must point to either the server itself or the public IP address of the server network's gateway.
Another possible cause is that the windows firewall is blocking access for the openvpn.exe binary. You may need to whitelist (add it to the "Exceptions" list) it for OpenVPN to work.