4

I'm trying to run OpenVPN on Ubuntu remote server. I've been following this tutorial. As of now, I'm right before Step 3, trying to get "VPN 'server' is running" message. However, when I run

service openvpn start
service openvpn status

I get:

enter image description here

"active (exited), code=exited, status=0/SUCCESS" response.

i tried checking logs:

vim /var/log/syslog

But don't see anything suspicious:

enter image description here

What could be the reasons behind this behaviour?

parsecer
  • 157

2 Answers2

5

The fact that you are looking at the wrong thing.

Your service is not named openvpn. It is named openvpn@configuration.

The instructions that you are following are for an older version of Ubuntu, whose services were arranged differently. You quite clearly have Ubuntu 15 or later.

Further reading

JdeBP
  • 68,745
1

I discovered that to start the OpenVPN server on Ubuntu 22, you need to use the following command:

systemctl start openvpn-server@server.service

The name of the service is based on the name of the configuration file, which, in my case, is located at /etc/openvpn/server/server.conf. For example, if the configuration file is named /etc/openvpn/server/example.conf, then you need to start it with:

systemctl start openvpn-server@example.service

To find the relevant OpenVPN service files, you can check the /lib/systemd/system directory.

Or, on Ubuntu, you can use systemctl list-units | grep openvpn to find the name of the service you need to start.

Volex
  • 121