Page 1 of 1

OpenVPN problem: route gateway is not reachable

Posted: Mon Mar 04, 2013 10:04 pm
by methodeux
Ok, so I've been trying to get OpenVPN to connect to my VPN provider. There seems to be a problem with the TAP driver. I've tried a variety of different things to resolve the issue with no success.

The problem: route gateway is not reachable on any active network adapters

Now, my VPN provider has their own wrapper application around OpenVPN. I tried downloading OpenVPN 2.3.0 to see if a newer version would help but I couldn't get it to read/list the config files in the taskbar app.

I've taken the following measures so far:

* Disabling antivirus, firewall, and removing all other VPN software. (no result)
* Ensured everything is installed and ran as administrator. (no result)
* Reset internet catalog per http://my.anuson.com/knowledgebase/61/O ... pters.html (no result)
* Added netsh and route-delay/route-method exe/ip-win32 netsh to the config. (resulted in netsh command failed: returned error code 1)

I've been at this for hours and hours and at this point don't know what to do. Please help! Operating system is Windows 7.
Mon Mar 04 14:46:21 2013 OpenVPN 2.2.2 Win32-MSVC++ [SSL] [LZO2] [PKCS11] built on Dec 15 2011
Mon Mar 04 14:46:21 2013 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Mon Mar 04 14:46:21 2013 LZO compression initialized
Mon Mar 04 14:46:21 2013 UDPv4 link local: [undef]
Mon Mar 04 14:46:21 2013 UDPv4 link remote: 184.75.213.34:8080
Mon Mar 04 14:46:21 2013 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Mon Mar 04 14:46:21 2013 [server] Peer Connection Initiated with 184.75.213.34:8080
Mon Mar 04 14:46:23 2013 TAP-WIN32 device [Local Area Connection 3] opened: \\.\Global\{9FCAA139-EEE6-4466-B046-B58AD54FFF09}.tap
Mon Mar 04 14:46:23 2013 Notified TAP-Win32 driver to set a DHCP IP/netmask of 10.142.46.18/255.255.255.252 on interface {9FCAA139-EEE6-4466-B046-B58AD54FFF09} [DHCP-serv: 10.142.46.17, lease-time: 31536000]
Mon Mar 04 14:46:58 2013 Warning: route gateway is not reachable on any active network adapters: 10.142.46.17
Mon Mar 04 14:46:58 2013 Warning: route gateway is not reachable on any active network adapters: 10.142.46.17
Mon Mar 04 14:46:58 2013 Warning: route gateway is not reachable on any active network adapters: 10.142.46.17
SYSTEM ROUTING TABLE
0.0.0.0 0.0.0.0 192.168.1.1 p=0 i=12 t=4 pr=3 a=200 h=0 m=20/0/0/0/0
0.0.0.0 128.0.0.0 10.142.46.17 p=0 i=12 t=4 pr=3 a=0 h=0 m=21/0/0/0/0
10.142.46.1 255.255.255.255 10.142.46.17 p=0 i=12 t=4 pr=3 a=0 h=0 m=21/0/0/0/0
127.0.0.0 255.0.0.0 127.0.0.1 p=0 i=1 t=3 pr=3 a=224 h=0 m=306/0/0/0/0
127.0.0.1 255.255.255.255 127.0.0.1 p=0 i=1 t=3 pr=3 a=224 h=0 m=306/0/0/0/0
127.255.255.255 255.255.255.255 127.0.0.1 p=0 i=1 t=3 pr=3 a=224 h=0 m=306/0/0/0/0
128.0.0.0 128.0.0.0 10.142.46.17 p=0 i=12 t=4 pr=3 a=0 h=0 m=21/0/0/0/0
184.75.213.34 255.255.255.255 192.168.1.1 p=0 i=12 t=4 pr=3 a=0 h=0 m=20/0/0/0/0
192.168.1.0 255.255.255.0 192.168.1.17 p=0 i=12 t=3 pr=3 a=200 h=0 m=276/0/0/0/0
192.168.1.17 255.255.255.255 192.168.1.17 p=0 i=12 t=3 pr=3 a=200 h=0 m=276/0/0/0/0
192.168.1.255 255.255.255.255 192.168.1.17 p=0 i=12 t=3 pr=3 a=200 h=0 m=276/0/0/0/0
224.0.0.0 240.0.0.0 127.0.0.1 p=0 i=1 t=3 pr=3 a=224 h=0 m=306/0/0/0/0
224.0.0.0 240.0.0.0 192.168.1.17 p=0 i=12 t=3 pr=3 a=210 h=0 m=276/0/0/0/0
255.255.255.255 255.255.255.255 127.0.0.1 p=0 i=1 t=3 pr=3 a=224 h=0 m=306/0/0/0/0
255.255.255.255 255.255.255.255 192.168.1.17 p=0 i=12 t=3 pr=3 a=210 h=0 m=276/0/0/0/0
SYSTEM ADAPTER LIST
Marvell Yukon 88E8057 PCI-E Gigabit Ethernet Controller
Index = 12
GUID = {7D58941C-CBC2-48B5-B74C-FB04EA53DB5E}
IP = 192.168.1.17/255.255.255.0
MAC = 00:1d:72:3f:dc:31
GATEWAY = 192.168.1.1/255.255.255.255
DHCP SERV = 192.168.1.1/255.255.255.255
DHCP LEASE OBTAINED = Mon Mar 04 14:43:38 2013
DHCP LEASE EXPIRES = Wed Dec 31 19:00:00 1969
DNS SERV = 192.168.1.1/255.255.255.255
Intel(R) WiFi Link 5100 AGN
Index = 11
GUID = {2870791C-908F-4917-A780-E863A067E31C}
IP = 0.0.0.0/0.0.0.0
MAC = 00:16:ea:72:6a:f4
GATEWAY = 0.0.0.0/255.255.255.255
DHCP SERV =
DHCP LEASE OBTAINED = Mon Mar 04 14:46:58 2013
DHCP LEASE EXPIRES = Wed Dec 31 19:00:00 1969
DNS SERV =
Mon Mar 04 14:46:58 2013 Initialization Sequence Completed With Errors ( see http://openvpn.net/faq.html#dhcpclientserv )

Re: OpenVPN problem: route gateway is not reachable

Posted: Thu Apr 25, 2013 8:32 pm
by luckman212
Same exact problem as the OP here. Win8 x64 -- openvpn 2.3.1-i001
everything running as administrator
:roll:

Re: OpenVPN problem: route gateway is not reachable

Posted: Fri Apr 26, 2013 10:49 am
by janjust
it seems that the tap-win32 is not yet available when openvpn is trying to set properties on it.
Try adding

Code: Select all

tap-sleep 3
to the client config to see if that helps. If that does help then try playing with

Code: Select all

route-delay 1 3
(read the openvpn manual page for details on what these settings do)

Re: OpenVPN problem: route gateway is not reachable

Posted: Fri Apr 26, 2013 1:22 pm
by luckman212
Actually I've tried those options before to no avail.

There is some kind of bug (not sure if it's in Windows or OpenVPN) but what happens is, after waking from sleep or hibernation, the TAP adapter is no longer listed in "ipconfig /all". That's how I know I'm "bugged" and OpenVPN will no longer route any packets anywhere. Disabling and Re-Enabling the TAP adapter does not do anything to fix this problem. The adapter still shows up in Network Connections, and "openvpn --show-adapters" correctly reports the TAP and has the right GUID etc. Not sure where to go from here -- anyone else having this problem?

Re: OpenVPN problem: route gateway is not reachable

Posted: Fri Apr 26, 2013 2:49 pm
by luckman212
I tinkered around some more and it seems like the TAP driver (tap0901) gets hosed somehow. I found a way to "reset" it that brings OpenVPN back to life without a reboot. This is not a fix but just a workaround -- If anyone knows how to debug this further so that a real fix might be implemented one day I'm all ears. Anyway, here's the command:

(run this from an administrative command prompt)

Code: Select all

devcon update "C:\Program Files\TAP-Windows\driver\OemWin2k.inf" tap0901
If you don't have devcon on your system and need to download it, see the links below
http://social.technet.microsoft.com/wik ... n-exe.aspx
http://social.technet.microsoft.com/For ... 6be1475ce4

Re: OpenVPN problem: route gateway is not reachable

Posted: Fri Apr 26, 2013 4:18 pm
by luckman212
Just noticed that devcon.exe is included in the TAP-Windows install dir:
C:\Program Files\TAP-Windows\bin\devcon.exe
(saves you the trouble of downloading the entire WDK just for that one tiny utility!) :D

Re: OpenVPN problem: route gateway is not reachable

Posted: Thu Nov 24, 2016 8:19 pm
by tap0user
I had the same problem and it was solved by configuring ip manually in the tap adapter and then putting it back in automatic.
It is as if it were a "block" of the DHCP request.

Re: OpenVPN problem: route gateway is not reachable

Posted: Tue Feb 28, 2017 2:10 pm
by Pallieter
Another workaround is to kill and recreate the TAP adapter before opening the VPN connection (on Windows a batch file can be used):

Code: Select all

"C:\Program Files\TAP-Windows\bin\tapinstall.exe" remove tap0901
"C:\Program Files\TAP-Windows\bin\tapinstall.exe" install "C:\Program Files\TAP-Windows\driver\OemVista.inf" tap0901
"C:\Program Files\OpenVPN\bin\openvpn.exe" "C:\path\to\your\connection\file.ovpn"
PS: create a shortcut to this batch file and set it to always open with elevated (admin) rights.

Re: OpenVPN problem: route gateway is not reachable

Posted: Thu Mar 01, 2018 1:20 pm
by JonatasPrust
I am facing the same problem under windows 10 Home and the last version of openvpn. I have made a workaround script, with the sugestion of this article. But it is not a solution of the problem. Can anyone help whith a possible solution?

Re: OpenVPN problem: route gateway is not reachable

Posted: Mon Apr 09, 2018 10:57 am
by MinnyMack
Confirm the problem. We need the decent solution, not a workaround.

Re: OpenVPN problem: route gateway is not reachable

Posted: Fri Apr 13, 2018 11:12 am
by mrfx
Hi there!

I have the same error message and VPN do not work with Windows 10 Pro (OpenVPN 2.4.5) although it works with my Android smartphone. Workarounds from this thread do not work.

Re: OpenVPN problem: route gateway is not reachable

Posted: Fri Apr 13, 2018 8:00 pm
by TinCanTech
methodeux wrote:
Mon Mar 04, 2013 10:04 pm
Ok, so I've been trying to get OpenVPN to connect to my VPN provider
The first course of action is to contact Your VPN Provider.
methodeux wrote:
Mon Mar 04, 2013 10:04 pm
The problem: route gateway is not reachable on any active network adapters
janjust wrote:
Fri Apr 26, 2013 10:49 am
it seems that the tap-win32 is not yet available when openvpn is trying to set properties on it.
Try adding

Code: Select all

tap-sleep 3
to the client config to see if that helps. If that does help then try playing with

Code: Select all

route-delay 1 3
(read the openvpn manual page for details on what these settings do)
Bo further replies from the OP methodeux .. problem solved.

The rest:

..


Please see:
HOWTO: Request Help !

Also:
https://openvpn.net/index.php/open-source/books.html

Closed -- due to poor quality information

Please link to this thread if it was the reason you asked for help here.