Page 1 of 1

Config file generated by client requests for external .key file

Posted: Mon Mar 04, 2024 4:56 am
by MrMc

it's been a couple of years since I last updated OpenVPN configuration for an old office setup.

Recently shifted locations, and bought a new router.

Similar to the old router, it has a straightforward OpenVPN tab which generates a config file which I'd normally distribute to the clients that need to access it. Config file currently returns an error message requesting for an external .key file, which should be inside the config file already.

Would like to check if there's syntax to have the config file directly refer to itself for the necessary certs.

Windows OpenVPN Connect client version is 3.4.4 (3412)

Sample config and screenshot of the error message provided below for reference. ... 9ZwLR/view ... HJiK7/view


Re: Config file generated by client requests for external .key file

Posted: Tue Mar 05, 2024 9:31 am
by JosephS
Hi MrMc,

It is possible to provide the path to the cert/keys inline .ovpn config file:

ca [path to .crt]
cert [path to .crt]
key [path to .key]
tls-auth [path to ta.key]

But, a much better approach would be to include the body of said ca/cert into the .ovpn config file with the following format:

# insert contet from ca.crt

# insert contet from client.crt

# insert contet from client.key

-----BEGIN OpenVPN Static key V1-----
# insert ta.key
-----END OpenVPN Static key V1-----

I hope the is helps.

With Regards,