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!


12 Responses to Using the OpenVPN Client in Vista

  1. neox says:

    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

  2. Paul Roach says:

    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….

  3. Agustin Fernandez says:

    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.

  4. Paul Roach says:

    Alegre a que ayudé Agustin :)

  5. stuart says:

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

  6. Fab says:

    I justa added to the end of the file ovpn

    route-method exe
    route-delay 2

  7. kungfupanda says:

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

  8. dan says:

    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.

  9. Alfree says:

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

    it will tell me cannot creat or check path

  10. Nilsa says:

    route-method exe
    route-delay 2

  11. Mike says:

    Oh thank you for this!! I have been trying to get IPcop VPN to work with Vista for some time now!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>