How to delay server start

Need help configuring your VPN? Just post here and you'll get that help.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
andrewa
OpenVpn Newbie
Posts: 3
Joined: Sun Jul 23, 2017 3:12 pm

How to delay server start

Post by andrewa » Sun Jul 23, 2017 3:31 pm

Today upgraded the old router from Fedora23 to 26 with new faster hardware. OpenVPN server does not connect to clients after CPU power on, if restarted the server works fine. Same config as on the old slow machine. I try to set some delay and read about --up-delay option. But it is not accepted by the config file and from command line as well, wrong syntax: demands --dev parameter. The manual page for 2.4 and older say nothing about the syntax, no examples found by googling.
Hoped to solve the issue by something like that (to get 30 seconds start up delay):
........
up-delay 30
............
Then tested: up-delay dev tun1 30 up-delay tun1 30 - nothing is accepted. From command line the options have "--" in front.
Any advice?

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: How to delay server start

Post by TinCanTech » Sun Jul 23, 2017 4:16 pm


andrewa
OpenVpn Newbie
Posts: 3
Joined: Sun Jul 23, 2017 3:12 pm

Re: How to delay server start

Post by andrewa » Mon Jul 24, 2017 6:15 pm

Sorry, I do not understand what I have put wrong. I repeat my question in a more clear and to-the-point words:

I need help about the full syntax of the following server configuration option:
Manual v. 2.4 (tunnel options):

"--up-delay Delay TUN/TAP open ... until after TCP/UDP connection establishment with peer."

As far as I understand, this option delays the open of TUN/TAP. How to specify the delay (in seconds)?
--up-delay - from command line reports missing --dev parameter,
up-delay - in configuration file prevents server launch.

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: How to delay server start

Post by TinCanTech » Mon Jul 24, 2017 7:00 pm

andrewa wrote:missing --dev parameter
You forgot --dev whatever

andrewa
OpenVpn Newbie
Posts: 3
Joined: Sun Jul 23, 2017 3:12 pm

Re: How to delay server start

Post by andrewa » Tue Jul 25, 2017 7:09 pm

Thanks for the tip! Ihave tested it before posting.
1. From terminal running:
openvpn --up-delay --dev tun1
does not complete the command, need to interrupt it with Ctrl+C.

2. When I place in server.conf file:
up-delay dev tun1 or
up-delay dev tun1 30
OpenVpn does not start, the error is:
Options error: Unrecognized option or missing or extra parameter(s) in server.conf:42: up-delay (2.4.3)

I think some value is needed to set the delay time, but I cannot figure out the correct syntax.

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: How to delay server start

Post by TinCanTech » Tue Jul 25, 2017 7:43 pm

--up-delay does not have a configurable parameter ..

See --up-delay in The Manual v24x

You probably need to consult your router manual and operating system about start up preferences.

Post Reply