Skip to content

Since 2.7.9 "route-method exe" can't set route #1151

Open

Description

@el0hh

OpenVPN 2.7.9 [git:v2.7.9/7b60c2aa34992639] Windows [SSL (OpenSSL)] [LZO] [LZ4] [PKCS11] [AEAD] [DCO] built on Nov 5 2026

Windows 11, connection startet via GUI without admin rights.

Problem:
Wed Nov 18 09:58:44 2026 C:\WINDOWS\system32\route.exe ADD 10.5.0.0 MASK 255.255.0.0 172.xx.xx.xx METRIC 200
Wed Nov 18 09:58:44 2026 env_block: add PATH=C:\WINDOWS\System32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
Wed Nov 18 09:58:44 2026 ERROR: Windows route add command failed: returned error code 1

with admin rights it's working.


Before e.g. 2026-11-18 09:39:37 us=312000 OpenVPN 2.7.6 [git:v2.7.6/327a33de2aa21883] Windows [SSL (OpenSSL)] [LZO] [LZ4] [PKCS11] [AEAD] [DCO] built on Aug 5 2026

it was also working without admin rights.

2026-11-18 09:39:45 us=656000 C:\WINDOWS\system32\route.exe ADD 10.5.0.0 MASK 255.255.0.0 172.xx.xx.xx METRIC 200
2026-11-18 09:39:45 us=656000 Route addition via service succeeded

The problem above occours when "route-method exe" is used.
Without exe, we have no problems.
From the past >10y ago, exe was the more reliable option to set routes inside a crapy os.

What is planned with this option in future?

Activity

  1. el0hh commented on Nov 18, 2026

    @el0hh
    Author
  2. added
    outdated code
    on Nov 18, 2026
  3. cron2 commented on Nov 18, 2026

    @cron2
    Contributor

    route-method exe never worked for an openvpn.exe binary started without admin privileges. Some documents on the Internet recommend running the OpenVPN GUI as run with administrator privileges which will end up running lots of code with admin privileges (not a good idea), and this was never necessary since 2.5.0, I think (which introduced the interactive service to do the routing table stuff).

    Why it worked for you in 2.7.6 is the more interesting question - we did not change it in the code to make it stop working in 2.7.9, or actively drop privileges in openvpn.exe or the GUI, but maybe the installer removed the admin privs from the GUI on updating...

    This said, it's unlikely someone will spend time on this, trying to figure out what changed in your installation - the expectation is that it will not work if run without admin privileges (so 2.7.9 behaves as expected), and the strong recommendation is to not run it with admin privs. Removing route-method exe should make it use the interactive service, which is a code path that must work all times. If not, please show a log of that.

    For OpenVPN 2.8, it is currently planned to remove all route-method variants from the code completely, and the whole option will be made a no-op ("warn, but do not change behaviour"). Interactive service will remain.

  4. cron2 commented on Nov 18, 2026

    @cron2
    Contributor

    He seems to have the same problem. https://forums.openvpn.net/d/46675-openvpn-279-route-add-methode-exe-and-adaptive/4

    thanks for the reference. This is curious indeed - it should have never worked on 2.7.8 - but it seems it did for unknown reasons (and our intend is to never break working client configs within a major release train, so that would be a regression). @lstipakov @d12fk any ideas?

  5. d12fk commented on Nov 18, 2026

    @d12fk
    Contributor

    I'll look into it

  6. d12fk commented on Nov 18, 2026

    @d12fk
    Contributor

    The fix for CVE-2026-115342 66faaa7 changed to order of the command line arguments passed from the service to openvpn. Since then --msg-channel comes before --config. This matters when there's a --route-method in the config, since --msg-channel has the side effect of setting the route-method to service, which is now overridden by any later --route-method passed as an option.

    Quick fix is to remove the --route-method from your config or if route-method is pushed add pull-filter ignore "route-method" to your config. We'll restore the old behavior in the next release, but as @cron2 said, --route-method doesn't actually do anything when the interactive service is used and is a noop effectively (until now). Also true, that it will be removed in 2.8.

  7. cron2 commented on Nov 18, 2026

    @cron2
    Contributor

    Ooooh indeed. Thanks for hunting this.

    Now, why was route-method exe working at all if going via the iservice and openvpn.exe runs unprivileged???

  8. d12fk commented on Nov 18, 2026

    @d12fk
    Contributor

    It was a NOOP. Overridden by --msg-channel setting route_method to service internally, because it came last.

    Edit: src/openvpn/options.c:6317

  9. cron2 commented on Nov 18, 2026

    @cron2
    Contributor

    ah, of course. He who can read needs not ask stupid questions

    2026-11-18 09:39:45 us=656000 Route addition via service succeeded
    

    this is what it says in the "success" case - via service. Thanks again.

  10. d12fk commented on Nov 18, 2026

    @d12fk
    Contributor
  11. cron2 commented on Nov 24, 2026

    @cron2
    Contributor

    So, the fix from gerrit 2219 is in, and will be in 2.7.10 "to be released wednesday next week" (dec 2).

    @d12fk I seem to remember we build windows snapshots from GH actions? Can you point @el0hh there for testing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Windowsoutdated code

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions