Openvpn: Difference between revisions

From miki
Jump to navigation Jump to search
Line 21: Line 21:
service openvpn start
service openvpn start
ps faux | grep openvpn # ok!
ps faux | grep openvpn # ok!
</source>

More info on [http://uname.pingveno.net/blog/index.php/post/2015/05/23/Migrate-an-OpenVPN-configuration-to-Debian-8-(Jessie)-with-systemd openvpn in systemd]. For instance, to start a specific configuration:

<source lang=bash>
systemctl enable openvpn@sample.service
# creates a symlink in /etc/systemd/system/multi-user.target.wants/openvpn@sample.service
# pointing to /lib/systemd/system/openvpn@.service
</source>
</source>

Revision as of 09:43, 24 October 2016

Guides

Troubleshooting

Server not running (systemd)

After configuring the server (file /etc/openvpn/server.conf, the server does not start:

service openvpn start           # or systemctl start openvpn
service openvpn status          # show active (exited)
ps faux | grep openvpn          # no service running
service openvpn stop


We have to tell systemd to create new generators [1]:

systemctl daemon-reload
service openvpn start
ps faux | grep openvpn          # ok!

More info on openvpn in systemd. For instance, to start a specific configuration:

systemctl enable openvpn@sample.service
# creates a symlink in /etc/systemd/system/multi-user.target.wants/openvpn@sample.service 
# pointing to /lib/systemd/system/openvpn@.service