Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to start Openvpn service at boot time

How do you configure the openvpn service to start when the computer boots?

Based on some other answers (which this board won't let me post links to apparently), this should simply be:

systemctl enable openvpn@server.service

but this just returns:

Failed to issue method call: No such file or directory

I can start/stop/find status of the service using

systemctl start openvpn@server.service
systemctl stop openvpn@server.service
systemctl status openvpn@server.service

I've also tried:

systemctl enable openvpn@service
systemctl enable openvpn.service

but these also result in "Failed to issue method call: No such file or directory"

How to start Openvpn service at boot time

How do you configure the openvpn service to start when the computer boots?

Based on some other answers (which this board won't let me post links to apparently), this should simply be:

systemctl enable openvpn@server.service

but this just returns:

Failed to issue method call: No such file or directory

I can start/stop/find status of the service using

systemctl start openvpn@server.service
systemctl stop openvpn@server.service
systemctl status openvpn@server.service

I've also tried:

systemctl enable openvpn@service
systemctl enable openvpn.service

but these also result in "Failed to issue method call: No such file or directory"

[user@localhost ~]# systemctl|grep vpn
openvpn@...i-user.service loaded failed failed        OpenVPN Robust And Highly Flexible Tunneling Application On multi/user
openvpn@server.service    loaded active running       OpenVPN Robust And Highly Flexible Tunneling Application On server
[user@localhost ~]# rpm -qs openvpn|grep service
normal        /lib/systemd/system/openvpn@.service

How to start Openvpn service at boot time

How do you configure the openvpn service to start when the computer boots?

Based on some other answers (which this board won't let me post links to apparently), this should simply be:

systemctl enable openvpn@server.service

but this just returns:

Failed to issue method call: No such file or directory

I can start/stop/find status of the service using

systemctl start openvpn@server.service
systemctl stop openvpn@server.service
systemctl status openvpn@server.service

I've also tried:

systemctl enable openvpn@service
systemctl enable openvpn.service

but these also result in "Failed to issue method call: No such file or directory"

[user@localhost ~]# systemctl|grep vpn
openvpn@...i-user.service loaded failed failed        OpenVPN Robust And Highly Flexible Tunneling Application On multi/user
openvpn@server.service    loaded active running       OpenVPN Robust And Highly Flexible Tunneling Application On server
[user@localhost ~]# rpm -qs openvpn|grep service
normal        /lib/systemd/system/openvpn@.service

[user@localhost ~]# ll /etc/openvpn
total 68
-rwxr-xr-x 1 root root   772 Jul 18  2011 bridge-start
-rwxr-xr-x 1 root root   316 Jul 18  2011 bridge-stop
-rw-r--r-- 1 root root    67 Jul 18  2011 client-connect.sh
-rw-r--r-- 1 root root    56 Jul 18  2011 client-disconnect.sh
drwxr-xr-x 4 root root  4096 Oct 19  2010 easy-rsa
-rw------- 1 root root   180 Feb 22 11:05 ipp.txt
drwx------ 2 root root  4096 Jan 22 10:49 keys
-rwxr-xr-x 1 root root   509 Jul 18  2011 nat-startup
-rwxr-xr-x 1 root root    45 Jul 18  2011 openvpn-shutdown
-rwxr-xr-x 1 root root    46 Jul 18  2011 openvpn-startup
-rw------- 1 root root   369 Feb 22 11:08 openvpn-status.log
-rw-r--r-- 1 root root 10916 Oct 10  2011 server.conf
-rw-r--r-- 1 root root 10562 Jul 18  2011 server.conf.orig

How to start Openvpn service at boot time

How do you configure the openvpn service to start when the computer boots?

Based on some other answers (which this board won't let me post links to apparently), this should simply be:

systemctl enable openvpn@server.service

but this just returns:

Failed to issue method call: No such file or directory

I can start/stop/find status of the service using

systemctl start openvpn@server.service
systemctl stop openvpn@server.service
systemctl status openvpn@server.service

I've also tried:

systemctl enable openvpn@service
systemctl enable openvpn.service

but these also result in "Failed to issue method call: No such file or directory"

[user@localhost ~]# systemctl|grep vpn
openvpn@...i-user.service loaded failed failed        OpenVPN Robust And Highly Flexible Tunneling Application On multi/user
openvpn@server.service    loaded active running       OpenVPN Robust And Highly Flexible Tunneling Application On server
[user@localhost ~]# rpm -qs openvpn|grep service
normal        /lib/systemd/system/openvpn@.service

[user@localhost ~]# ll /etc/openvpn
total 68
-rwxr-xr-x 1 root root   772 Jul 18  2011 bridge-start
-rwxr-xr-x 1 root root   316 Jul 18  2011 bridge-stop
-rw-r--r-- 1 root root    67 Jul 18  2011 client-connect.sh
-rw-r--r-- 1 root root    56 Jul 18  2011 client-disconnect.sh
drwxr-xr-x 4 root root  4096 Oct 19  2010 easy-rsa
-rw------- 1 root root   180 Feb 22 11:05 ipp.txt
drwx------ 2 root root  4096 Jan 22 10:49 keys
-rwxr-xr-x 1 root root   509 Jul 18  2011 nat-startup
-rwxr-xr-x 1 root root    45 Jul 18  2011 openvpn-shutdown
-rwxr-xr-x 1 root root    46 Jul 18  2011 openvpn-startup
-rw------- 1 root root   369 Feb 22 11:08 openvpn-status.log
-rw-r--r-- 1 root root 10916 Oct 10  2011 server.conf
-rw-r--r-- 1 root root 10562 Jul 18  2011 server.conf.orig

Showing successfully enabling and starting the service, rebooting, and then showing the service did not start:

[user@localhost ~]# ssh user@host
[user@host ~]# sudo systemctl status openvpn@server.service
openvpn@server.service - OpenVPN Robust And Highly Flexible Tunneling Application On server
      Loaded: loaded (/lib/systemd/system/openvpn@.service; enabled)
      Active: inactive (dead)
      CGroup: name=systemd:/system/openvpn@.service/server
[user@host ~]# sudo systemctl start openvpn@server.service
[user@host ~]# sudo systemctl status openvpn@server.service
openvpn@server.service - OpenVPN Robust And Highly Flexible Tunneling Application On server
      Loaded: loaded (/lib/systemd/system/openvpn@.service; enabled)
      Active: active (running) since Mon, 04 Mar 2013 11:22:14 -0500; 16s ago
     Process: 20585 ExecStart=/usr/sbin/openvpn --daemon --writepid /var/run/openvpn/%i.pid --cd /etc/openvpn/ --config %i.conf (code=exited, status=0/SUCCESS)
    Main PID: 20586 (openvpn)
      CGroup: name=systemd:/system/openvpn@.service/server
          └ 20586 /usr/sbin/openvpn --daemon --writepid /var/run/openvpn/server.pid --cd /etc/openvpn/ --config server.conf
[user@host ~]# sudo reboot

Broadcast message from user@host on pts/0 (Mon, 04 Mar 2013 11:23:01 -0500):

The system is going down for reboot NOW!

[user@localhost ~]# Connection to host closed by remote host.
[user@localhost ~]# ssh user@host
[user@host ~]# sudo systemctl status openvpn@server.service
openvpn@server.service - OpenVPN Robust And Highly Flexible Tunneling Application On server
      Loaded: loaded (/lib/systemd/system/openvpn@.service; enabled)
      Active: inactive (dead)
      CGroup: name=systemd:/system/openvpn@.service/server