Combining Certificates in ovpn file error

Scripts to manage certificates or generate config files

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
gobris
OpenVpn Newbie
Posts: 1
Joined: Thu Feb 13, 2020 1:57 pm

Combining Certificates in ovpn file error

Post by gobris » Thu Feb 13, 2020 2:12 pm

Hello.. I have a running config with keeping certificate files externally.
I am using user/pass authentication so no need to use client certificates.
My config is as;

Code: Select all

client
dev tun
proto tcp
remote my-server-2 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
tls-auth ta.key 1
comp-lzo
verb 6
auth-user-pass
It is working fine.. I have the ca.crt ca.key ta.key files on config folder also


New created file,

Code: Select all

client
dev tun
proto tcp
remote myserver-2 1194
resolv-retry infinite
nobind
persist-key
persist-tun
<ca>
-----BEGIN CERTIFICATE-----
xxxx
-----END CERTIFICATE-----
</ca>
<key>
-----BEGIN PRIVATE KEY-----
xxx
-----END PRIVATE KEY-----
</key>
<tls-auth>
-----BEGIN OpenVPN Static key V1-----
xxxxxxxxxxxxx
-----END OpenVPN Static key V1-----
</tls-auth>
key-direction 1
comp-lzo
verb 6
auth-user-pass
This time.. on android and iphone clients vpn works..
But on windows openvpn client, I receive

Options error: If you use one of --cert or --key, you must use them both

I dont have client certificate. because i am using username auth..
I have following lines on my serverside also..

Code: Select all

duplicate-cn
plugin /usr/lib/openvpn/openvpn-auth-ldap.so /etc/openvpn/auth/auth-ldap.conf
client-cert-not-required

As I wrote, this new config works on mobile clients.. but not on windows side..
I'd be glad if somebody helps..

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: Combining Certificates in ovpn file error

Post by TinCanTech » Thu Feb 13, 2020 5:30 pm

gobris wrote:
Thu Feb 13, 2020 2:12 pm
Options error: If you use one of --cert or --key, you must use them both

I dont have client certificate
If you don't have a cert then you cannot use a key.

Post Reply