My server uses it's server certificate when connecting as a client to another server.
- webserver - server1.mydomain.com
- openvpnserver - server2.mydomain.com
Server1 is a web server with SSL installed for *.mydomain.com
Server2 is an OpenVPN server I with to connect Server1 to
The Server1 cannot connect to Server2 because it uses it's own *.mydomain.com certificate and NOT the supplied and configured server1.crt when starting the OpenVPN request.
Is there a configuration for when to use the *.mydomain.com cert or when to use the server1.mydomain.com cert? Or maybe I can override this from the OpenVPN client conf?
Log file at OpenVPN server:
Thu Nov 13 08:44:16 2014 us=545958 192.168.1.1:43737 VERIFY ERROR: depth=0, error=unable to get local issuer certificate: CN=*.mydomain.com
Client config:
client
dev tun
proto udp
remote server2.mydomain.com 1194
resolv-retry infinite
nobind
user nobody
group nogroup
persist-key
persist-tun
ca /root/vpn/ca.crt
cert /root/vpn/server1.crt
key /root/vpn/server1.key
ns-cert-type server
tls-auth /root/vpn/ta.key 1
comp-lzo
verb 3
mute 10
I've looked at the certificate again:
sudo openssl x509 -text -noout -in /root/vpn/server1.crt
My issue was stupidity, I've switched two certificates at some point.