Openvpn fails to start in systemd, 20.04
By Mia Morrison •
A new client configuration. I can launch openvpn and connect via the executable, but systemd cannot start openvpn
I tried
systemctl start
systemctl start openvpn@server
systemctl start openvpn@service
systemctl start openvpnand all the same using the service command. Same start failure.
I have the config file in
/etc/openvpn/
/etc/openvpn/clientThe logs appear to indicate it finds my config file but does not digest it. And then proceeds to look in another directory for something it likes.
logs:
Oct 31 00:00:01 brad-lappy2 openvpn[116161]: WARNING: Compression for receiving enabled. Compression has been used in the past to break encryption. Sent packets are not compressed unless "allow-compression yes" is also set.
Oct 31 00:00:01 brad-lappy2 ovpn-.service[116162]: Options error: In [CMD-LINE]:1: Error opening configuration file: /etc/openvpn/.service.conf
Oct 31 00:00:01 brad-lappy2 ovpn-.service[116162]: Use --help for more information.
Oct 31 00:00:01 brad-lappy2 ovpn-server[116164]: WARNING: Compression for receiving enabled. Compression has been used in the past to break encryption. Sent packets are not compressed unless "allow-compression yes" is also set.
Oct 31 00:00:01 brad-lappy2 ovpn-client.service[116163]: WARNING: Compression for receiving enabled. Compression has been used in the past to break encryption. Sent packets are not compressed unless "allow-compression yes" is also set.
Oct 31 00:00:01 brad-lappy2 ovpn-service[116166]: WARNING: Compression for receiving enabled. Compression has been used in the past to break encryption. Sent packets are not compressed unless "allow-compression yes" is also set.
Oct 31 00:00:01 brad-lappy2 systemd[1]: : Main process exited, code=exited, status=1/FAILURE
Oct 31 00:00:01 brad-lappy2 systemd[1]: : Failed with result 'exit-code'.
Oct 31 00:00:01 brad-lappy2 systemd[1]: Failed to start OpenVPN connection to .service.
Oct 31 00:00:01 brad-lappy2 systemd[1]: : Main process exited, code=exited, status=1/FAILURE
Oct 31 00:00:01 brad-lappy2 systemd[1]: : Failed with result 'exit-code'.
Oct 31 00:00:01 brad-lappy2 systemd[1]: Failed to start OpenVPN service for server.
Oct 31 00:00:01 brad-lappy2 systemd[1]: : Main process exited, code=exited, status=1/FAILURE
Oct 31 00:00:01 brad-lappy2 systemd[1]: : Failed with result 'exit-code'.
Oct 31 00:00:01 brad-lappy2 systemd[1]: Failed to start OpenVPN connection to client.service.
Oct 31 00:00:01 brad-lappy2 systemd[1]: : Main process exited, code=exited, status=1/FAILURE
Oct 31 00:00:01 brad-lappy2 systemd[1]: : Failed with result 'exit-code'.
Oct 31 00:00:01 brad-lappy2 systemd[1]: Failed to start OpenVPN connection to server.
Oct 31 00:00:01 brad-lappy2 systemd[1]: : Main process exited, code=exited, status=1/FAILURE
Oct 31 00:00:01 brad-lappy2 systemd[1]: : Failed with result 'exit-code'.
Oct 31 00:00:01 brad-lappy2 ovpn-server.service[116165]: WARNING: Compression for receiving enabled. Compression has been used in the past to break encryption. Sent packets are not compressed unless "allow-compression yes" is also set.
Oct 31 00:00:01 brad-lappy2 systemd[1]: Failed to start OpenVPN connection to service.
Oct 31 00:00:01 brad-lappy2 systemd[1]: : Main process exited, code=exited, status=1/FAILURE
Oct 31 00:00:01 brad-lappy2 systemd[1]: : Failed with result 'exit-code'.
Oct 31 00:00:01 brad-lappy2 systemd[1]: Failed to start OpenVPN connection to server.service.config:
client
remote mypublicip
dev tun
#ifconfig 10.9.8.2 10.9.8.1
nobind
#persist-key
#persist-tun
tls-client
ca /etc/openvpn/ca.crt
cert /etc/openvpn/client2.crt
key /etc/openvpn/client2.key
comp-lzo
verb 5
ping-restart 60
log /var/log/openvpn/openvpn.log
allow-compression yesAll config files are chmod 777
How do I get systemd to launch openvpn?
Bonus question:
I'm not getting DNS either on this one client, when launching via executable. But that's my next issue. Maybe systemd will fix it.
2 Reset to defaultKnow someone who can answer? Share a link to this question via email, Twitter, or Facebook.
More in general
"Zoraya ter Beek, age 29, just died by assisted suicide in the Netherlands. She was physically healthy, but psychologically depressed. It's an abomination that an entire society would actively facilitate, even encourage, someone ending their own life because they had no hope. Th…"