You are not logged in.

#1 2016-12-27 01:08:53

TheChickenMan
Member
From: United States
Registered: 2015-07-25
Posts: 354

[SOLVED] OpenVPN Server Starting Early

I am currently working to setup a new Arch router. As of now it's running four different network interfaces and needs to run two OpenVPN servers. OpenVPN enables alright but will fail to start when the computer boots.

This will produce no error but upon reboot the service will be listed as "failed".

systemctl enable openvpn@server.service

This works fine and starts the service normally.

systemctl start openvpn@server.service

The error led me to believe that it was attempting to start the server before the [correct] interface came online. In order to fix this I wrote a systemd timer which simply waits 10 seconds after reaching timers.target and then starts the service manually by running a script file which contains

systemctl start openvpn@server.service

While this solution does work it seems really inelegant to me. I think the "proper" way to fix it would be to edit the openvpn@.service unit file to contain a different target to wait for than the defaults but I'm not really sure what would be the best thing to use here or if there's a better solution that I had not considered.

Suggestions appreciated. smile

Last edited by TheChickenMan (2017-01-14 22:14:20)


If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet.
Niels Bohr

Offline

#2 2016-12-27 01:38:24

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] OpenVPN Server Starting Early

Does `After=network.target network-online.target` not work?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2016-12-27 03:56:37

TheChickenMan
Member
From: United States
Registered: 2015-07-25
Posts: 354

Re: [SOLVED] OpenVPN Server Starting Early

jasonwryan wrote:

Does `After=network.target network-online.target` not work?

Correct. This does not work for me with this setup.

I also tried enabling NetworkManager-wait-online.service but this also proved ineffective.

Last edited by TheChickenMan (2016-12-27 03:58:55)


If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet.
Niels Bohr

Offline

#4 2017-01-14 22:14:04

TheChickenMan
Member
From: United States
Registered: 2015-07-25
Posts: 354

Re: [SOLVED] OpenVPN Server Starting Early

I had some ideas to work with on this but it appears to no longer be an issue with the latest OpenVPN server update. Marking as solved.


If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet.
Niels Bohr

Offline

Board footer

Powered by FluxBB