On 26/07/15 17:54, Alan McKay wrote:
> On Sun, Jul 26, 2015 at 10:39 AM, David Sommerseth
> <[email protected]> wrote:
>> This issue is not related to this at all.  The described issue is expected
>> when OpenVPN is started on a system with systemd.
> 
> Except that on my CentOS 7 system at work it worked forever without
> having to do the extra part you mentioned.
> 
> And in fact it still works for 1 VPN but only for the other VPN does
> it background like that.

I'll try to run a few extra tests on Scientific Linux 7 which I use on my
boxes, which should be fairly close to CentOS 7.

Anyhow, if you run more VPNs, I highly recommend you to start OpenVPN through
systemd unit files.

I've done a slight modification to the systemd unit file found in our git tree
(until we've sorted out a few other systemd adoptations), which should work:

<http://fpaste.org/248305/31820143/raw/>

Store this file as /etc/systemd/system/[email protected]
(yes, with that @ character)

Put all your config files under /etc/openvpn/client and ensure SELinux
contexts are properly set, using restorecon -Rv /etc

Now everything should be configured, and you can do:

   # systemctl start openvpn-client@CONFIG_NAME

So if your config file is /etc/openvpn/client/vpncfg1.conf, you do:

   # systemctl start openvpn-client@vpncfg1

To look at the logs, you use journalctl:

   # journalctl -u openvpn-client@vpncfg1

To enable starting this config at boot, do:

   # systemctl enable openvpn-client@vpncfg1

Swap out 'enable' with 'disable' to stop starting it at boot.


At least lets see if this sorts out some of your annoyances.  And please do
try to dun these 'systemctl start' commands via sudo as well, just to see if
it behaves differently.


-- 
kind regards,

David Sommerseth

------------------------------------------------------------------------------
_______________________________________________
Openvpn-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-users

Reply via email to