Skip to content

Windows Community Edition does not install routes like other implementations #940

@wayne47git

Description

@wayne47git

Describe the bug
I have dozens of OpenVPN connections around the country connecting FreeBSD servers and Edgerouters and attempted to use the same process to create links to my Windows11 notebook running 2.6.17 to FreeBSD and Ubuntu servers. Eventually it became clear that Windows fails to create any gateway routes back to the server.

This was first noticed on a FreeBSD server with jails. The main conf file contains lines like:
push "route AAA.BBB.CC.DD 255.255.255.225" # The jails on this host

which resulted in an error (timestamp removed) only on Windows:
OpenVPN ROUTE: OpenVPN needs a gateway parameter for a --route option and no default was specified by either --route-gateway or --ifconfig options OpenVPN ROUTE: failed to parse/resolve route for host/network: AAA.BBB.CC.DD

I ignored that, choosing to get OpenVPN working correctly before worrying about the jail. Note, however, that in every other instance, this works correctly.

Eventually, it became clear that OpenVPN on Windows as a client fails to install gateway routes to the server. An example ccd file (that works everywhere else) would contain the single line:
ifconfig-push 172.16.26.1 172.16.26.3
Note that the Windows client does properly install a route for 172.16.26.3

For windows clients, it was required to add one more line: because it defaults to net30:
push "topology subnet"

While the VPN would come up, no traffic would be routed. The only fix I could determine was to run (as Administrator) a route add command:
route add 172.16.23.1 172.16.23.3

To Reproduce
See above

Expected behavior
I expected OpenVPN to act like every other implementation and tell the client to install a gateway route back to the server for the OpenVPN link as well as any associated route it created.

Version information (please complete the following information):

  • OS: Windows 11 (client)
  • OpenVPN version: 2.6.17

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions