Openvpn client etc folders

Hi all,

Still new to linux but I am having a ton of fun and am learning a lot.

I am attempting to run an openvpn client automatically at startup. I have swupd’ed (as a verb?) Network basics and successfully connected to my vpn provider via sudo openvpn myfilename.ovpn.

My next step was to add credentials and auto start but the instructions reference files in etc.

Adding the credentials seems straight forward but it looks like the file to run as a service (not sure of terminology) isn’t where it was in the instructions. Ie sudo systemctl openvpn-client@.service seems to have worked. Or at least didnt complain. But. I am not able to find the config file to point to at my .ovpn file.

Have I missed a step?

Thanks
David

If you use the default Clear Linux desktop, just use the VPN option under Settings > Network > VPN +. There you can also simply import a config file, if you have one…maybe you have to point to the right paths to your certificate files.

Without a desktop environment, i would setup a systemd service.

Thanks spktkpkt

I have it set up as a service now. I was able to start it with:

sudo systemctl start openvpn-client@client

I had to create a folder at /etc/openvpn/client. i got this from the file that defined openvpn-client@.service.

in this folder I created a client.conf from the file I received from my VPN provider. It wouldn’t restart after boot until I did

sudo systemctl enable openvpn-client@client

I thought I had run that but for some reason didn’t take until after I rebooted. either way now when I do

curl ifconfig.co/city

it gives me my vpn’s city so i think its working now.

1 Like