Problem setting up OpenVPN server

Hi, I'm trying to set up an OpenVPN server on my OpenWRT router.

I'm following the instructions here: https://openwrt.org/docs/guide-user/services/vpn/openvpn/server
The problem I'm having is that the server.pem and client.pem files seem to be missing from my /etc/easy-rsa/pki/private directory.

Because of this is get an error when executing
root@OpenWrt:/etc/easy-rsa/pki/private# openvpn --genkey tls-crypt-v2-server ${EASYRSA_PKI}/private/server.pem
Options error: Unrecognized option or missing or extra parameter(s) in [CMD-LINE]:1: genkey (2.4.11)

Any help would be much appreciated !

Dave

Are you sure that EASYRSA_PKI variable has been set up?

yes, I'm sure. When I replace the variable with location, I get the same result

root@OpenWrt:/# openvpn --genkey tls-crypt-v2-server /etc/easy-rsa/pki/private/server.pem

Options error: Unrecognized option or missing or extra parameter(s) in [CMD-LINE]:1: genkey (2.4.11)
Use --help for more information.

I am able to do the following to generate a key using the command below, but it seems not to accept the tls-crypt-v2-server option. Is that option necessary?
root@OpenWrt:/# openvpn --genkey --secret /etc/easy-rsa/pki/private/server.pem

It is not OpenWRT issue, it is openvpn --genkey question. See examples using openvpn --genkey: openvpn --genkey --secret static.key

Upgrade to OpenWrt 21.02, or use an earlier revision of the article:
https://openwrt.org/docs/guide-user/services/vpn/openvpn/server?rev=1632708683

2 Likes

Thank you - upgrading to 21.02 solved it for me !

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.