3

I tried to set up OpenVPN following this step by step guide. Now I struggle to start the server using sudo systemctl start openvpn@server the output of sudo systemctl status openvpn@server looks like this:

* openvpn@server.service - OpenVPN connection to server
  Loaded: loaded (/lib/systemd/system/openvpn@.service; enabled-runtime; vendor preset: enabled)
  Active: activating (auto-restart) (Result: exit-code) since Thu 2019-05-30 09:16:36 UTC; 2s ago
    Docs: man:openvpn(8)
          https://community.openvpn.net/openvpn/wiki/Openvpn24ManPage
          https://community.openvpn.net/openvpn/wiki/HOWTO
 Process: 417 ExecStart=/usr/sbin/openvpn --daemon ovpn-server --status /run/openvpn/server.status 10 --cd /etc/openvpn --script-security 2 --config /etc/openvpn/server.conf --writepid /run/openvpn/server.pid (code=exited, status=1/FAILURE)
Main PID: 417 (code=exited, status=1/FAILURE)
  Status: "Pre-connection initialization successful"

I'm confused about the activating.

Rui F Ribeiro
  • 56,709
  • 26
  • 150
  • 232
mabu
  • 171

2 Answers2

4

After two hours of pain I finally managed to get OpenVPN running! This is what I found out.

openvpn@server.service: Failed to reset devices.list: Operation not permitted

Since I'm running it on a Proxmox LXC container I had to put something into /etc/pve/lxc/<ID>.conf on the Proxmox host to create the needed tun device:

lxc.mount.entry = /dev/net/tun dev/net/tun none bind,create=file

After that change a new error occured:

ovpn-server[1693]: daemon() failed or unsupported: Resource temporarily unavailable (errno=11)

This was fixed by commenting out in /lib/systemd/system/openvpn@.service:

#LimitNPROC=10

Helpful resources:

Rui F Ribeiro
  • 56,709
  • 26
  • 150
  • 232
mabu
  • 171
1

I also had such an error. Initially I had server.conf file with

user nobody 
group nobody

I changed it to

user nobody 
group nogroup 

and everything worked.

The thing seems to be that the Ubuntu operating system does not have a group nobody.

AdminBee
  • 22,803
Rumata
  • 11
  • I just recently ran into this too while fiddling on a Ubuntu machine and came to same conclusion. Thank you! – mabu May 21 '23 at 14:12