Ubuntu 22.04 OpenVPN config

Need help configuring your VPN? Just post here and you'll get that help.

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

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
nfkhalaychidi
OpenVpn Newbie
Posts: 1
Joined: Mon Feb 27, 2023 12:35 pm

Ubuntu 22.04 OpenVPN config

Post by nfkhalaychidi » Mon Feb 27, 2023 12:40 pm

I have .ovpn file, exported from OpenVPN server:

OVPN File
dev tun
persist-tun
persist-key
cipher AES-256-CBC
auth SHA512
client
resolv-retry infinite
remote xxx.xxx.xxx.xxx 1194 udp
lport 0
verify-x509-name "C=xxx, ST=xxx, L=xxx, O=xxx, emailAddress=xxx@xxx.xxx, CN=xxx" subject
remote-cert-tls server
auth-user-pass auth.txt
comp-lzo adaptive
pkcs12 xxx.p12
tls-auth xxx-tls.key 1

Sure I have auth.txt, xxx.p12 and xxx-tls.key files, exported from the same OpenVPN server

Can anyone please explain me, what have I do to config client with this files on Ubuntu 22.04?

I've installed openvpn

Code: Select all

apt-get install openvpn
Put all the files to

Code: Select all

/etc/openvpn/client
Tried to

Code: Select all

openvpn --config /etc/openvpn/client/xxx.ovpn
Have an error

Code: Select all

Cannot pre-load keyfile (xxx-tls.key)
I'm not sure these steps are right...
I have only ssh access, so I need to configure it with console

Post Reply