A VPN provider gives .ovpn files that contain the configuration necessary to connect to a VPN server using the command : openvpn name.ovpn

However using this command isn't very clean since it uses a shell that you can't close anymore if you want to keep the connection. Instead I'd like to be controlling the openvpn connection through systemd but it is my understanding that I first need to create a name.conf file in /etc/openvpn so I can then call the command systemctl enable openvpn@name.service which would be handy since it would connect to the VPN server at startup.

How to go from the .ovpn config file to /etc/openvpn/name.conf ?

  • In newer version put file in /etc/openvpn/client/ dir – Dawid Drozd Jul 16 '20 at 10:06

It's the same thing, you can basically just rename the .ovpnfile into .confand move it into /etc/openvpn

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.