apt install openvpn
Transfer your ovpn
, p12
and key
files from the OpenVPN server to your client and place them in /etc/openvpn/client/
. I exported my config from pfSense OpenVPN server.
mv myVPN-1.ovpn myVPN-1.p12 myVPN-1.key /etc/openvpn/client/
Change the ovpn
file extension to conf
mv myVPN-1.ovpn myVPN-1.conf
Test that the connection will come up
openvpn --config /etc/openvpn/client/myVPN-1.conf
The VPN tunnel should come up.
Make sure to manually validate the conf
file if the tunnel doesn't come up.
To start the VPN client and open the connection on boot.
Enable the service using the name of the conf file (without the .confg
extension, but WITH the .service
extension)
systemctl enable openvpn-client@myVPN-1.service
Start the service
systemctl start openvpn-client@myVPN-1.service