Using the OpenVPN Client in Vista

This morning had a client that was having difficulties connecting to our SSL VPN using the OpenVPN client.  The error they were getting was:

Tue Apr 08 17:31:45 2008 ROUTE: route addition failed using CreateIpForwardEntry
: Access is denied.   [status=5 if_index=25]
Tue Apr 08 17:31:45 2008 Route addition via IPAPI failed [adaptive]
Tue Apr 08 17:31:45 2008 Route addition fallback to route.exe
The requested operation requires elevation.
Tue Apr 08 17:31:45 2008 ERROR: Windows route add command failed [adaptive]: sys
tem() returned error code 1

Looking at the error, it obviously points to a permissions excalation issue in Vista – the workaround:

Edit the config file of the SSL vpn (the .ovpn file) in C:\Program Files\OpenVpn\config and add the following lines:

#Force the use of route.exe
route-method exe

This will force OpenVPN to add the route using Route.exe

Then create a batch file to run the OpenVPN executable with the confif file specified::

“C:\program files\OpenVPN\bin\openVPN.exe” “C:\program files\openvpn\config\yourconfigname.ovpn”

Right click the batch file and run as administrator, and it should work!