You are not logged in.
Pages: 1
I recently set up a VPN using OpenVPN and want it to run on system boot. The Wiki tells me to enable the service using
systemctl enable openvpn-client@client.service
While this did enable the service, the VPN doesn't start on boot. Attempting to manually start the service using systemctl doesn't work either, it just gives an error opening the configuration file:
Jun 12 00:06:54 archlinux systemd[1]: Starting OpenVPN tunnel for proton...
Jun 12 00:06:54 archlinux openvpn[4379]: Options error: In [CMD-LINE]:1: Error opening configuration file: proton.conf
Jun 12 00:06:54 archlinux openvpn[4379]: Use --help for more information.
Jun 12 00:06:54 archlinux systemd[1]: openvpn-client@proton.service: Main process exited, code=exited, status=1/FAILURE
Jun 12 00:06:54 archlinux systemd[1]: openvpn-client@proton.service: Failed with result 'exit-code'.
Jun 12 00:06:54 archlinux systemd[1]: Failed to start OpenVPN tunnel for proton.
The only way I've been able to start the VPN is with
sudo openvpn /etc/openvpn/client/config.ovpn
which works nicely but doesn't help me start on boot.
Any ideas as to what's happening here and how I could fix it?
Last edited by arti946 (Today 04:02:47)
Offline
It seems like a configuration path error
Jun 12 00:06:54 archlinux openvpn[4379]: Options error: In [CMD-LINE]:1: Error opening configuration file: proton.conf
Are you sure where the proton.conf file is located?
ls /etc/openvpn/client/
Offline
Yes I am certain that the .ovpn configuration file is in the proper place, and the VPN will start no problem if I do it manually with the openvpn command. When I double-checked just now I did notice that I needed root permissions to even view /etc/openvpn/client, and I had to run ls with sudo in order to view the files I had in there. Is it possible that OpenVPN doesn't have the permissions it needs to read the config file?
Offline
Update: This is more of a workaround than a fix, but I got everything working (though I'm not totally sure why it worked). I uninstalled OpenVPN and switched to WireGuard, still using config files from ProtonVPN. I then enabled WireGuard using systemctl:
systemctl enable wg-quick@<CONFIG>.service
I also had to disable the systemd-networkd-wait-online service, though I'm not sure why:
systemctl disable systemd-networkd-wait-online.service
Disabling this service did not fix the issue with OpenVPN, which gave me the same error I posted about above.
It isn't quite perfect. My desktop takes notably longer to boot now, but my laptop (where I repeated the process) doesn't, although the laptop isn't actually connected to a vpn despite the program actively running. However, since the core issue I was having has been resolved, I'm going to mark the thread as solved.
Offline
Pages: 1