Opened 10 years ago

Closed 4 years ago

#56 closed Bug / Defect (worksforme)

WinXP: route setup broken after standby

Reported by: Samuli Seppänen Owned by:
Priority: major Milestone: release 2.4
Component: Networking Version: OpenVPN 2.2-beta / 2.2-RC (Community Ed)
Severity: Not set (select this one, unless your'e a OpenVPN developer) Keywords: windows client suspend resume


Using openvpn 2.0.5.

Briefly, the static route to the openvpn server as
described under about
--redirect-gateway point (1) is NOT restored after
suspend/resume cycle on a windows client. Which leads
to a non-working openvpn.


I've got a perfectly working openVPN setup in
client-server mode.

  • server has option push "redirect-gateway def1"
  • server has option keepalive x y
  • client openvpn is run from command line (linux &

windows machines)

When connecting a windows client, everything works
fine. But after a standby/resume cycle, the tunnel is

After analysis it appears that after windows comes
back from standby, the tunnel was closed by the
server because of --keepalive, this is ok. Then
openvpn client tries to reconnect to the server but
fails, this is _not_ ok. The reconnection fails
because the route to the server is _not_ restored
after standby.

As described under about
--redirect-gateway point (1), a static root is
created on client to reach --remote through
pre-existing default gateway. And THAT route is lost
during standby-resume cycle. So we understand why
openvpn client can't reconnect to server: its
reconnection attempt goes through the openvpn tunnel
(the default route) and openvpn tunnel is down, so no

Change History (15)

comment:1 Changed 10 years ago by Samuli Seppänen

Originally reported to the tracker by Arnaud Burlet. Similar issues reported in email threads in 2004, 2006 and 2010.

comment:2 Changed 10 years ago by Samuli Seppänen

Component: Generic / unclassifiedNetworking

comment:3 Changed 10 years ago by Samuli Seppänen

Version: 2.1.0 / / 2.2-RC

comment:4 Changed 10 years ago by billb3

I just want to add that I cannot replicate this issue with Windows XP. Waking from standby/hibernation always works as expected. On Windows 7, the issue happens every single time when "waking". Please let me know if you would like me to submit logs or do any testing. Thanks!

comment:5 Changed 10 years ago by Samuli Seppänen

This issue may be caused by routes being brought up too soon either by the openvpn service (on boot) or openvpn-gui (on startup or when restoring from suspend/hibernation). Adding route-delay (e.g. route-delay 30) in your OpenVPN configuration may help - if it does, please mention it here so this bug report can be closed.

comment:6 Changed 10 years ago by billb3

For my issue with Windows 7 (was directed to this bug from the mailing list), adding "route-delay 30" has not affect. The tunnel is not automatically reconnected after resume. I am using 2.1.4 (and have tested beta 2.2.5) and have the tunnel setup as a service.
Link to my original report:

comment:7 Changed 10 years ago by billb3

I have created the following ticket, as this ticket appears to be for Windows XP and my issue is different.

comment:8 Changed 10 years ago by roentgen

A comment to get me subscribed to this ticket.

comment:9 Changed 10 years ago by David Sommerseth

Version: 2.2-beta / 2.2-RC2.3-beta / 2.3-RC

comment:10 Changed 10 years ago by David Sommerseth

Milestone: beta 2.3
Version: 2.3-beta / 2.3-RC2.2-beta / 2.2-RC

comment:11 Changed 9 years ago by thgood

I am having this issue with 2.2.0 release.
I have tried adding route-delay 30 it did not help the problem.

On my laptop it can even happen if the computer is locked and does not go into standby.

comment:12 Changed 7 years ago by Samuli Seppänen

Milestone: beta 2.3release 2.4

comment:13 Changed 7 years ago by Samuli Seppänen

Keywords: windows client suspend resume added

comment:14 Changed 5 years ago by Samuli Seppänen

This very old. Many of these "resume from suspend/hibernation" type issues may be solved by the upcoming integration of nssm.exe (manual integration instructions here).

Unless somebody shouts soon I'll close this ticket as "worksforme".

comment:15 Changed 4 years ago by Gert Döring

Resolution: worksforme
Status: newclosed

it definitely works for *me* and we've added a number of things that should fix this for good - inside openvpn, inside the gui, fixing all the services as well.

Just closing.

Note: See TracTickets for help on using tickets.