Mar 15

 OpenVPN+GUI (openvpn-2.0.9-gui-1.0.3) in client mode will connect to the remote OpenVPN server, but will not accept the routes. Error in the log is as follows:

ROUTE: route addition failed using CreateIpForwardEntry: One or more arguments are not correct. [if_index=18]
Route addition via IPAPI failed

Solution:

add the following to the end of the configuration (ovpn) file:

route-method exe
route-delay 2

written by MG \\ tags: ,


47 Responses to “Vista and Win 7: OpenVPN route problem”

  1. 1. cristi Says:

    It works on Windows 7. Thank you!

  2. 2. John Says:

    Thank you! You often write very interesting articles. You improved my mood.

  3. 3. Parker Says:

    Tried it – added
    route-method exe
    route-delay 2
    to the ovpn config file … and still am not able to get online using Witopia ovpn sw.

    Suggestions?

  4. 4. MG Says:

    i don’t know how Witopia works.. sorry.. I use my own openvpn server on linux.

  5. 5. Lourens Says:

    Hi MG, after adding “route-method exe” and “route-delay 2” to my config, the above error is gone – thank you – although I still cannot rdp the VPN site – doing the same under XP it works – Windows 7 is a problem.

    Please help.

  6. 6. robert Says:

    Find OpenVPN GUI icon, press shift, right click on icon and select “Run as administrator”. Now works perfect!

  7. 7. MG Says:

    I use windows 7 and i don’t have this problem.. maybe because my accout has administrative rights.

  8. 8. Paul Says:

    thank you.

  9. 9. Michael Says:

    Whole day of trying and then: google found solution. Thanks MG.
    openvpn 2.1.1 was supposed to fix this problem. Unfortunately it didn’t.
    Thanks again.

  10. 10. Etienne Says:

    Windows Vista needs Open VPN GUI to run as administrator… so right-click openvpn GUI and select ‘run as administrator’ and you should be fine.

  11. 11. adi Says:

    YESSS !!!
    route-method exe
    route-delay 2

    ITS WORKK!!!
    thanks..

  12. 12. clare Says:

    I’m trying to use this fix on a vista laptop – but when I right click on openvpn the “run as administrator” check-box is greyed out. I’ve tried switching off UAC but it didnt do anything.

  13. 13. Mike Says:

    I have been trying to figure this out for a very long time! Thanks so much!

  14. 14. Nick Says:

    You are a life saver! 🙂 Many thanks!

  15. 15. philipscuong Says:

    Thanks for ur help !

  16. 16. michalj Says:

    Thanks mate! Works great on W7. May I ask how did you figure it out?

  17. 17. MG Says:

    Google is my friend 🙂

  18. 18. Rob Says:

    Perfect. Thanks

  19. 19. Chandero Says:

    Great! Muy bien!
    Thank you ! Gracias
    It works! funciona a la perfección

  20. 20. dexter Says:

    Mon Nov 29 08:26:00 2010 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
    Mon Nov 29 08:26:00 2010 TLS Error: TLS handshake failed
    Mon Nov 29 08:26:00 2010 TCP/UDP: Closing socket
    Mon Nov 29 08:26:00 2010 SIGUSR1[soft,tls-error] received, process restarting
    Mon Nov 29 08:26:00 2010 Restart pause, 2 second(s)
    dis problem i encountered..it keeps restarting..

  21. 21. Mircea Says:

    Great!
    Solved my problem 🙂

  22. 22. BB Says:

    I add these parameters.
    But when i run openvpn (on Win7) without admin rights –
    i have ERROR: Windows route add command failed: system() returned error code 1

    when run with admin rights –
    i have the same
    ROUTE: route addition failed using CreateIpForwardEntry: One or more arguments are not correct. [if_index=18]
    Route addition via IPAPI failed

    wtf?

  23. 23. BB Says:

    oh, it my mistake.
    when i add route params to the config file, my text editor opens a “copy” of the config file and doesn’t save the changes to the “original” file (because the same UAC 🙂 ).

    now all works fine.

    Thnx!

  24. 24. sundAr Says:

    hi,
    thank you so much.i am very happy.its work me.

  25. 25. Artur Says:

    I have the same problem on my Win 7 Pro x64.
    My VPN-server works under CentOS 6.0 and has such config:
    local 192.168.0.1
    port 1194
    proto udp
    dev tun
    ca ca.crt
    cert srv.crt
    key srv.key
    dh /usr/local/openvpn/easy-rsa/keys/dh1024.pem
    crl-verify /usr/local/openvpn/easy-rsa/keys/revoke-test.pem
    server 10.10.0.0 255.255.255.0
    ifconfig-pool-persist ipp.txt
    push “route 172.16.0.0 255.255.255.0”
    push “route 192.168.0.0 255.255.255.0”
    client-config-dir /usr/local/openvpn/ccd
    route 172.16.1.0 255.255.255.0
    keepalive 10 120
    comp-lzo
    persist-key
    persist-tun
    cipher AES-128-CBC

    Client has this config:
    client
    dev tun
    proto udp
    remote 1194
    resolv-retry infinite
    nobind
    persist-key
    persist-tun
    ca ca.crt
    cert client.crt
    key client.key
    cipher AES-128-CBC
    comp-lzo
    verb 3
    route-method exe
    route-delay 2

    And routes is still does not applied from the server.

  26. 26. Artur Says:

    Yepppp!!!!!!! It works after reboot!!!!!!!!
    THANKS!!!!!!

  27. 27. stef Says:

    Great! Love you for this solution!!! ;O)

  28. 28. Gerardo Says:

    Genial Amigo!! Gracias!!

  29. 29. zorror Says:

    it takes care for the problem but the vpn does not work if i add these commands

  30. 30. zeljko Says:

    It works also for windows vista
    Thank you!

  31. 31. Vichra(Cambodia) Says:

    Thanks Etienne …. it’s great

  32. 32. raaz Says:

    ERROR: Windows route add command failed

    my email thegame1020@yahoo.com

  33. 33. ionutz6 Says:

    Thanks a lot! It fixed my problem!

  34. 34. Andre Says:

    Thanks Chief, my local IT guy didn’t see it 🙂
    Mind you, he’s busy…

  35. 35. Arunkumar.A Says:

    Great…!! It works..!!

  36. 36. Becca Says:

    If i right click openvpn icon -> edit config -> and try and add this to the config and then save it says access denied. I have correct security setup on the openvpn program files folder. Any ideas??

  37. 37. Rezaul Says:

    It worked on my Win7x64, Thanks

  38. 38. Nitin Mittal Says:

    Thank You!Thank You!Thank You!Thank You!Thank You!Thank You!Thank You!Thank You!Thank You!Thank You!Thank You!Thank You!Thank You!Thank You!Thank You!Thank You!Thank You!Thank You!Thank You!Thank You!Thank You!Thank You!Thank You!Thank You!Thank You!Thank You!Thank You!Thank You!Thank You!Thank You!Thank You!Thank You!Thank You!Thank You!

  39. 39. Stanley Says:

    For some Windows 7 users, you need to

    1. right click “OpenVPN GUI” icon
    2. click “Run as Administrator”

    in order to have sufficient privilege to accept “push” route from OpenVPN server.

  40. 40. Sid Says:

    Great, saved my day! Thanks a lot!

  41. 41. David Fabry Says:

    Thank you ! it worked great in Windows 7

  42. 42. Swapnil Says:

    Thanks it helps me 2.

  43. 43. tane Says:

    Many thanks, this information help me to get the tunnel finally to work.

  44. 44. William van Beek Says:

    I had some spare time for you all to make a small program: http://imgur.com/EzecS2a
    You can get the program here:
    http://pastelink.me/dl/57435f

    Cheers 🙂

  45. 45. Justin Says:

    Worked perfectly! Thanks!

  46. 46. Mario Says:

    Simle and quick resolution: add user without admin rights to local group “network operators”

    Enjoy!!

  47. 47. drcomputers Says:

    ROUTE: route addition failed using CreateIpForwardEntry: Parametro non corretto. [status=87 if_index=32]

Leave a Reply

*