When I use this on site A:
tls-auth ta-hmac.key 0
tls-server
ns-cert-type server
remote-cert-tls server
tls-remote otherserver
remote otherserver.demo.tld
I can
not connect. Changing the first 2 lines to
tls-auth ta-hmac.key 1
tls-client
makes it work (of course I also changed site B to the opposite in both cases). My site A has a client cert, site B has a server cert. Does it depend on the cert type if tls-server or tls-client must be used?
With the first config, the server (site B) spits out this messages:
VERIFY ERROR: depth=0, error=unsupported certificate purpose: <blabla site A cert details>
TLS_ERROR: BIO read tls_read_plaintext error: error:140890B2:SSL routines:SSL3_GET_CLIENT_CERTIFICATE:no certificate returned
TLS Error: TLS object -> incoming plaintext read error
TLS Error: TLS handshake failed
I'm asking because I currently cannot open the VPN tunnel between site B+C, where both have a server cert.
Also, I want my site A (client) to be tls-server, so that it starts the connection. But I seem to only get it running with tls-client...