Hello,
I'm currently struggling with setting up a vpn client running on a windows 10 machine.
I made ca.key, ca.crt, reservce.key, reserve.crt.
Than I created an ovpn file, like this:
- ##############################################
# Sample client-side OpenVPN 2.0 config file #
# for connecting to multi-client server. #
# #
# This configuration can be used by multiple #
# clients, however each client should have #
# its own cert and key files. #
# #
# On Windows, you might want to rename this #
# file so it has a .ovpn extension #
##############################################
# Specify that we are a client and that we
# will be pulling certain config file directives
# from the server.
client
# Use the same setting as you are using on
# the server.
# On most systems, the VPN will not function
# unless you partially or fully disable
# the firewall for the TUN/TAP interface.
;dev tap
dev tun
# Windows needs the TAP-Win32 adapter name
# from the Network Connections panel
# if you have more than one. On XP SP2,
# you may need to disable the firewall
# for the TAP adapter.
;dev-node MyTap
# Are we connecting to a TCP or
# UDP server? Use the same setting as
# on the server.
;proto tcp
proto udp
# The hostname/IP and port of the server.
# You can have multiple remote entries
# to load balance between the servers.
remote a.b.c.d 2***0
;remote my-server-2 1194
# Choose a random host from the remote
# list for load-balancing. Otherwise
# try hosts in the order specified.
;remote-random
# Keep trying indefinitely to resolve the
# host name of the OpenVPN server. Very useful
# on machines which are not permanently connected
# to the internet such as laptops.
resolv-retry infinite
# Most clients don't need to bind to
# a specific local port number.
nobind
# Downgrade privileges after initialization (non-Windows only)
;user nobody
;group nogroup
# Try to preserve some state across restarts.
persist-key
persist-tun
# If you are connecting through an
# HTTP proxy to reach the actual OpenVPN
# server, put the proxy server/IP and
# port number here. See the man page
# if your proxy server requires
# authentication.
;http-proxy-retry # retry on connection failures
;http-proxy [proxy server] [proxy port #]
# Wireless networks often produce a lot
# of duplicate packets. Set this flag
# to silence duplicate packet warnings.
mute-replay-warnings
# SSL/TLS parms.
# See the server config file for more
# description. It's best to use
# a separate .crt/.key file pair
# for each client. A single ca
# file can be used for all clients.
ca ca.crt
cert reserve.crt
key reserve.key
# Verify server certificate by checking
# that the certicate has the nsCertType
# field set to "server". This is an
# important precaution to protect against
# a potential attack discussed here:
# http://openvpn.net/howto.html#mitm
#
# To use this feature, you will need to generate
# your server certificates with the nsCertType
# field set to "server". The build-key-server
# script in the easy-rsa folder will do this.
ns-cert-type server
# If a tls-auth key is used on the server
# then every client must also have the key.
;tls-auth ta.key 1
# Select a cryptographic cipher.
# If the cipher option is used on the server
# then you must also specify it here.
;cipher x
# Enable compression on the VPN link.
# Don't enable this unless it is also
# enabled in the server config file.
comp-lzo
# Set log file verbosity.
verb 3
# Silence repeating messages
;mute 20
key-direction 1
When I put reserve.ovpn, reserve.crt, reserve.key and ca.crt on my android device.
Do an import of the ovpn file and I'm able to connect to my vpn.
But when I import the ovpn file (with all the other files in the same directory) on the windows machine and click on connect I get this error.
- VERIFY ERROR: depth=1, error=self signed certificate in certificate chain: C=BE, ST=West-Vlaanderen, L=xxxxxxxx, O=xxxxxxxx, OU=xxxxxxxx, CN=OpenVPN, name=EasyRSA, emailAddress=xxxxxxxx
Thu Oct 24 09:41:07 2019 OpenSSL: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
Thu Oct 24 09:41:07 2019 TLS_ERROR: BIO read tls_read_plaintext error
Thu Oct 24 09:41:07 2019 TLS Error: TLS object -> incoming plaintext read error
Thu Oct 24 09:41:07 2019 TLS Error: TLS handshake failed
my reserve.crt file looks like this:
- Certificate:
Data:
Version: 3 (0x2)
Serial Number: 4 (0x4)
Signature Algorithm: sha256WithRSAEncryption
Issuer: C=BE, ST=West-Vlaanderen, L=xxxxxxxx, O=xxxxxxxx, OU=xxxxxxxx, CN=OpenVPN/name=EasyRSA/emailAddress=xxxxxxxx
Validity
Not Before: Oct 24 07:14:49 2019 GMT
Not After : Oct 21 07:14:49 2029 GMT
Subject: C=BE, ST=West-Vlaanderen, L=xxxxxxxx, O=xxxxxxxx, OU=xxxxxxxx, CN=reserve/name=EasyRSA/emailAddress=xxxxxxxx
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (1024 bit)
Modulus:
00:d4:95:e3:82:a1:0c:af:0f:93:03:37:aa:79:3e:
be:8a:53:78:2c:6e:01:c0:df:7a:22:e0:48:07:e8:
aa:d1:33:72:89:ab:b6:4c:1b:08:96:6d:f5:d9:9d:
xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:
aa:bb:c0:75:69:a8:e6:c1:44:16:e9:cc:f3:8c:90:
ef:a0:66:04:0d:50:90:f7:b3:22:1e:5a:72:ae:03:
87:db:c8:cc:9c:c2:ce:2f:0d:f7:05:b1:b2:8b:c1:
2d:13:9a:8d:76:77:db:49:8c:21:ed:b8:50:e6:ef:
53:94:a9:a7:51:d7:e8:b4:09
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Basic Constraints:
CA:FALSE
Netscape Comment:
Easy-RSA Generated Certificate
X509v3 Subject Key Identifier:
89:4B:91:69:0A:F0:8D:79:xx:xx:xx:E5:F1:48:AF:93:D0:5F:54:86
X509v3 Authority Key Identifier:
keyid:5E:A3:CB:B5:C0:BB:xx:xx:xx:BD:F4:01:8E:C8:DB:53:71:8B:28:71
DirName:/C=BE/ST=West-Vlaanderen/L=xxxxxxxx/O=xxxxxxxx/OU=xxxxxxxx/CN=OpenVPN/name=EasyRSA/emailAddress=xxxxxxxx
serial:8B:17:E4:xx:xx:C4:87:0C
X509v3 Extended Key Usage:
TLS Web Client Authentication
X509v3 Key Usage:
Digital Signature
X509v3 Subject Alternative Name:
DNS:reserve
Signature Algorithm: sha256WithRSAEncryption
22:f4:f1:dd:06:e1:0d:07:6f:3c:88:0e:9d:61:07:4a:c8:21:
eb:43:47:e2:22:af:04:1b:67:0b:a2:6b:bb:7b:31:64:e2:6a:
36:4f:01:a3:1e:79:8a:e3:34:a9:86:7c:3c:e3:35:c3:a1:b7:
xx:xx:xx:xx:xx:xx:xx:xx:e3:28:0d:6c:77:53:c3:c6:e3:53:
d8:c8:58:39:98:46:45:4e:9b:73:17:de:f1:3b:f8:93:d8:a8:
64:9c:3c:83:32:61:20:6a:d3:b0:71:f0:27:96:90:1d:34:db:
e9:fd:f0:54:be:20:59:fa:8c:ad:14:d7:c2:61:14:85:8d:34:
7a:c7
-----BEGIN CERTIFICATE-----
MIIEHDCCA4WgAwIBAgIBBDANBgkqhkiG9w0BAQsFADCBnTELMAkGA1UEBhMCQkUx.
...
-----END CERTIFICATE-----
Anybody an idea where I can look or what is wrong in my configuration files?
I have been reading forums and tutorials like crazy, I'm out of options.