Roachys Weblog

A digital notebook of technical experiences

Using the OpenVPN Client in Vista

with 11 comments

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!

Written by Paul Morgan-Roach

April 9, 2008 at 12:40 pm

11 Responses

Subscribe to comments with RSS.

  1. I just tried your tips.

    Well, the “route-method exe” doesn’t work if you do not run the batch file as administrator.

    Then I just tried the usual config file but runned as administrator, and it works.

    So the TIPS is :
    - install openvpn (or openvpn-gui)
    - run the program as Administrator
    - launch your connection.

    Enjoy

    neox

    April 21, 2008 at 4:13 pm

  2. As stated:

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

    Without forcing the OpenVpn client to create the route using route.exe, we had no luck…..it was only on editing the config that it started working….it would time out attempting to create the route using IPAPI ….

    Just personal experience and how the issue was resolved for me….

    Paul Roach

    April 22, 2008 at 8:10 am

  3. Muchas gracias por el post, muy útil. La único que tuve que modificar fueron los path y nombres de los archivos ya que en mi máquina no eran exactamente iguales.

    el contenido de mi .bat fue el siguiente.
    “C:\program files\OpenVPN\bin\openvpn.exe” “C:\program files\openVPN\config\client.ovpn”

    Y solo funcionó al ejecutarlo como administrador.

    Saludos.

    Agustin Fernandez

    July 18, 2008 at 4:14 am

  4. Alegre a que ayudé Agustin :)

    Paul Roach

    July 18, 2008 at 7:02 am

  5. yes, that works beautifully for my windows 7 install – thanks

    stuart

    March 25, 2009 at 7:05 pm

  6. I justa added to the end of the file ovpn

    route-method exe
    route-delay 2

    Fab

    March 31, 2009 at 6:14 pm

  7. This works perfectly with my windows vista…
    the key thing is creating the batch file and run it as administrator mode

    kungfupanda

    August 20, 2009 at 1:10 am

  8. Ok thanks for the info. my problem is some how related. i’m using freedom proxy browser,connecting through mobile phone. the vpn will show red lines almost at the point of connection. I would love if u can provide a solution sir. this my email dkess15@gmail.com. i will check again in future with hope. thanks a lot and keep the good work.

    dan

    August 25, 2009 at 4:15 pm

  9. how can i add route-method exe
    route-delay 2

    it will tell me cannot creat or check path

    Alfree

    September 25, 2009 at 3:00 pm

  10. route-method exe
    route-delay 2

    Nilsa

    November 26, 2009 at 9:47 pm

  11. BOLEH KENALAN GA

    CECEP SYARIFUDDIN

    December 15, 2009 at 8:25 pm


Leave a Reply