Portál AbcLinuxu, 13. května 2025 23:54
openssl req -new -x509 -nodes -out cacert.pem -keyout cakey.pem -days 1098a vygeneroval si žádost a podepsal certifikační autoritou:
openssl req -new -nodes -out request.pem -keyout key.pem -days 1098 openssl ca -in request.pem -out cert.pemtakto jsem si vygenroval certifikát pro server i pro klienty, ale když se chci klientem připojit tak mi to píše:
Wed Feb 28 09:10:37 2007 Expected Remote Options hash (VER=V4): '0ddbb6e3' Wed Feb 28 09:10:37 2007 UDPv4 link local (bound): [undef]:1194 Wed Feb 28 09:10:37 2007 UDPv4 link remote: 1.2.3.4:1194 Wed Feb 28 09:10:37 2007 TLS: Initial packet from 1.2.3.4:1194, sid=7ad56819 95772ba3 Wed Feb 28 09:10:37 2007 VERIFY ERROR: depth=1, error=self signed certificate in certificate chain: /C=CZ/ST=Czech/O=Internet_Widgits_Pty_Ltd/CN=Certifikacni_autorita/emailAddress=novotny@falcocomputer.cz Wed Feb 28 09:10:37 2007 TLS_ERROR: BIO read tls_read_plaintext error: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed Wed Feb 28 09:10:37 2007 TLS Error: TLS object -> incoming plaintext read error Wed Feb 28 09:10:37 2007 TLS Error: TLS handshake failed Wed Feb 28 09:10:37 2007 TCP/UDP: Closing socket Wed Feb 28 09:10:37 2007 SIGUSR1[soft,tls-error] received, process restarting Wed Feb 28 09:10:37 2007 Restart pause, 2 second(s)Chyba musí být asi někde v těch certifikátech, protože když si tam nahraju ty testovací certifikáty co jsou u distribuce tak mi to bez problémů chodí. Díky moc za radu
Řešení dotazu:
ca
na cacert.pem
na obou stranach spojeni? Neodkazuje stale na "distribucni" certifikat?
Jeste me napada, predpokladam, ze jste si dal pozor, aby se certifikat podepsal spravnou certifikacni autoritou (podle navodu na root.cz). Ze onen cacert.pem
a spol. jsou tam kde je vyzaduji konfiguraky k openssl...
mode server tls-server dev tap ifconfig 10.0.1.100 255.255.255.0 ifconfig-pool 10.0.1.1 10.0.1.90 255.255.255.0 duplicate-cn ca /etc/openvpn/cacert.pem cert /etc/openvpn/vpn.crt key /etc/openvpn/vpn.key dh /etc/openvpn/dh1024.pem log-append /var/log/openvpn status /var/run/openvpn/vpn.status 10Klient:
remote stroj.domena.cz tls-client dev tap pull mute 10 ca cacert.pem cert klient.cert key klient.key #comp-lzo verb 3
Wed Feb 28 18:44:37 2007 OpenVPN 2.0.9 Win32-MinGW [SSL] [LZO] built on Oct 1 2006 Wed Feb 28 18:44:37 2007 IMPORTANT: OpenVPN's default port number is now 1194, based on an official port number assignment by IANA. OpenVPN 2.0-beta16 and earlier used 5000 as the default port. Wed Feb 28 18:44:37 2007 WARNING: No server certificate verification method has been enabled. See http://openvpn.net/howto.html#mitm for more info. Wed Feb 28 18:44:37 2007 Control Channel MTU parms [ L:1573 D:138 EF:38 EB:0 ET:0 EL:0 ] Wed Feb 28 18:44:37 2007 Data Channel MTU parms [ L:1573 D:1450 EF:41 EB:4 ET:32 EL:0 ] Wed Feb 28 18:44:37 2007 Local Options hash (VER=V4): '2c50bd2c' Wed Feb 28 18:44:37 2007 Expected Remote Options hash (VER=V4): '0ddbb6e3' Wed Feb 28 18:44:37 2007 UDPv4 link local (bound): [undef]:1194 Wed Feb 28 18:44:37 2007 UDPv4 link remote: 192.168.0.252:1194 Wed Feb 28 18:44:37 2007 TLS Error: Unroutable control packet received from 192.168.0.252:1194 (si=3 op=P_ACK_V1) Wed Feb 28 18:44:38 2007 TLS Error: Unroutable control packet received from 192.168.0.252:1194 (si=3 op=P_ACK_V1) Wed Feb 28 18:44:40 2007 TLS Error: Unroutable control packet received from 192.168.0.252:1194 (si=3 op=P_CONTROL_V1) Wed Feb 28 18:44:40 2007 TLS Error: Unroutable control packet received from 192.168.0.252:1194 (si=3 op=P_CONTROL_V1) Wed Feb 28 18:44:40 2007 TLS Error: Unroutable control packet received from 192.168.0.252:1194 (si=3 op=P_CONTROL_V1) Wed Feb 28 18:44:40 2007 TLS Error: Unroutable control packet received from 192.168.0.252:1194 (si=3 op=P_CONTROL_V1) Wed Feb 28 18:44:40 2007 TLS Error: Unroutable control packet received from 192.168.0.252:1194 (si=3 op=P_CONTROL_V1) Wed Feb 28 18:44:40 2007 TLS Error: Unroutable control packet received from 192.168.0.252:1194 (si=3 op=P_CONTROL_V1) Wed Feb 28 18:44:40 2007 TLS Error: Unroutable control packet received from 192.168.0.252:1194 (si=3 op=P_CONTROL_V1) Wed Feb 28 18:44:40 2007 TLS Error: Unroutable control packet received from 192.168.0.252:1194 (si=3 op=P_CONTROL_V1) Wed Feb 28 18:44:42 2007 NOTE: --mute triggered... Wed Feb 28 18:44:51 2007 43 variation(s) on previous 10 message(s) suppressed by --mute Wed Feb 28 18:44:51 2007 TLS: Initial packet from 192.168.0.252:1194, sid=fd1ddf6d b1033725 Wed Feb 28 18:44:51 2007 VERIFY ERROR: depth=0, error=unsupported certificate purpose: /C=CZ/ST=Czech_Republic/O=Internet_Widgits_Pty_Ltd/CN=samanta Wed Feb 28 18:44:51 2007 TLS_ERROR: BIO read tls_read_plaintext error: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed Wed Feb 28 18:44:51 2007 TLS Error: TLS object -> incoming plaintext read error Wed Feb 28 18:44:51 2007 TLS Error: TLS handshake failed Wed Feb 28 18:44:51 2007 TCP/UDP: Closing socket Wed Feb 28 18:44:51 2007 SIGUSR1[soft,tls-error] received, process restarting Wed Feb 28 18:44:51 2007 Restart pause, 2 second(s) Wed Feb 28 18:44:53 2007 IMPORTANT: OpenVPN's default port number is now 1194, based on an official port number assignment by IANA. OpenVPN 2.0-beta16 and earlier used 5000 as the default port. Wed Feb 28 18:44:53 2007 WARNING: No server certificate verification method has been enabled. See http://openvpn.net/howto.html#mitm for more info. Wed Feb 28 18:44:53 2007 Control Channel MTU parms [ L:1573 D:138 EF:38 EB:0 ET:0 EL:0 ] Wed Feb 28 18:44:53 2007 Data Channel MTU parms [ L:1573 D:1450 EF:41 EB:4 ET:32 EL:0 ] Wed Feb 28 18:44:53 2007 Local Options hash (VER=V4): '2c50bd2c' Wed Feb 28 18:44:53 2007 Expected Remote Options hash (VER=V4): '0ddbb6e3' Wed Feb 28 18:44:53 2007 UDPv4 link local (bound): [undef]:1194 Wed Feb 28 18:44:53 2007 UDPv4 link remote: 192.168.0.252:1194 Wed Feb 28 18:44:53 2007 TLS Error: Unroutable control packet received from 192.168.0.252:1194 (si=3 op=P_CONTROL_V1) Wed Feb 28 18:44:53 2007 TLS Error: Unroutable control packet received from 192.168.0.252:1194 (si=3 op=P_CONTROL_V1) Wed Feb 28 18:44:53 2007 TLS Error: Unroutable control packet received from 192.168.0.252:1194 (si=3 op=P_CONTROL_V1) Wed Feb 28 18:44:53 2007 TLS Error: Unroutable control packet received from 192.168.0.252:1194 (si=3 op=P_CONTROL_V1) Wed Feb 28 18:44:53 2007 TLS: Initial packet from 192.168.0.252:1194, sid=4ff02bf9 fa747c1d Wed Feb 28 18:44:54 2007 VERIFY ERROR: depth=0, error=unsupported certificate purpose: /C=CZ/ST=Czech_Republic/O=Internet_Widgits_Pty_Ltd/CN=samanta Wed Feb 28 18:44:54 2007 TLS_ERROR: BIO read tls_read_plaintext error: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed Wed Feb 28 18:44:54 2007 TLS Error: TLS object -> incoming plaintext read error Wed Feb 28 18:44:54 2007 TLS Error: TLS handshake failed Wed Feb 28 18:44:54 2007 TCP/UDP: Closing socket Wed Feb 28 18:44:54 2007 SIGUSR1[soft,tls-error] received, process restarting Wed Feb 28 18:44:54 2007 Restart pause, 2 second(s) Wed Feb 28 18:44:56 2007 IMPORTANT: OpenVPN's default port number is now 1194, based on an official port number assignment by IANA. OpenVPN 2.0-beta16 and earlier used 5000 as the default port. Wed Feb 28 18:44:56 2007 WARNING: No server certificate verification method has been enabled. See http://openvpn.net/howto.html#mitm for more info. Wed Feb 28 18:44:56 2007 Control Channel MTU parms [ L:1573 D:138 EF:38 EB:0 ET:0 EL:0 ] Wed Feb 28 18:44:56 2007 Data Channel MTU parms [ L:1573 D:1450 EF:41 EB:4 ET:32 EL:0 ] Wed Feb 28 18:44:56 2007 Local Options hash (VER=V4): '2c50bd2c' Wed Feb 28 18:44:56 2007 Expected Remote Options hash (VER=V4): '0ddbb6e3' Wed Feb 28 18:44:56 2007 UDPv4 link local (bound): [undef]:1194 Wed Feb 28 18:44:56 2007 UDPv4 link remote: 192.168.0.252:1194 Wed Feb 28 18:44:56 2007 TLS Error: Unroutable control packet received from 192.168.0.252:1194 (si=3 op=P_CONTROL_V1) Wed Feb 28 18:44:56 2007 TLS Error: Unroutable control packet received from 192.168.0.252:1194 (si=3 op=P_CONTROL_V1) Wed Feb 28 18:44:56 2007 TLS Error: Unroutable control packet received from 192.168.0.252:1194 (si=3 op=P_CONTROL_V1) Wed Feb 28 18:44:56 2007 TLS Error: Unroutable control packet received from 192.168.0.252:1194 (si=3 op=P_CONTROL_V1) Wed Feb 28 18:44:56 2007 TLS Error: Unroutable control packet received from 192.168.0.252:1194 (si=3 op=P_CONTROL_V1) Wed Feb 28 18:44:56 2007 TLS Error: Unroutable control packet received from 192.168.0.252:1194 (si=3 op=P_CONTROL_V1) Wed Feb 28 18:44:56 2007 TLS Error: Unroutable control packet received from 192.168.0.252:1194 (si=3 op=P_CONTROL_V1) Wed Feb 28 18:44:56 2007 TLS Error: Unroutable control packet received from 192.168.0.252:1194 (si=3 op=P_CONTROL_V1) Wed Feb 28 18:44:58 2007 TLS Error: Unroutable control packet received from 192.168.0.252:1194 (si=3 op=P_CONTROL_V1) Wed Feb 28 18:44:58 2007 TLS Error: Unroutable control packet received from 192.168.0.252:1194 (si=3 op=P_CONTROL_V1) Wed Feb 28 18:44:58 2007 NOTE: --mute triggered...díky za rady
Potom by jeste mohla mit asi neco do cineni polozka common name
. Napr. nevim, jak by se openvpn zachoval, kdyby ji mely oba certifikaty stejnou (ac myslim, ze by to rekl jinak) - ale ne vzdy chyby signalizuji to co se opravdu stalo
/usr/share/doc/openvpn/examples/easy-rsa/
(distro debian) pár skriptíkov + návod, s ktorými funguje všetko podľa očakávaní.
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.