OpenVPN connects, but no ping

OpenVPN connection issue on Windows Vista and Windows 7



When connecting to an OpenVPN tunnel on Windows Vista or Windows 7, the OpenVPN GUI shows the connection as successful, but the protected network can not be reached.


Start OpenVPN as administrator. This is necessary even of the account launching OpenVPN is an administrator level account. If the OpenVPN GUI is already running, quit the application. Before launching OpenVPN GUI, right click, and select “Run As Administrator”.

There is a way to make this permanent in the Windows application properties:

Right click on the OpenVPN GUI icon, then click on Properties, and on the Compatibility tab. Tick the “Run this program as an administrator box.”

OpenVPN write UDPv4: Can't assign requested address (code=49)


On Max OS X, when trying to connect to an OpenVPN gateway, you may encounter the following error:
2010-01-21 05:14:59 write UDPv4: Can't assign requested address (code=49)
2010-01-21 05:15:01 write UDPv4: Can't assign requested address (code=49)

The error would repeat itself indefinitely.

Root Cause

The TCP stack of the Mac has a bug that can cause the routing table to get corrupted.


The routing table needs to be flushed on the interface used to connect to the Internet. Typically,

  • en0: ethernet (wired) interface
  • en1: wlan (wireless) interface

The easiest way is to flush the routes is to reboot. The elegant way however is to shut down the interface connecting the Mac to the Internet, flush the routing table, and bring the interface back up. For example, assuming a wired connection, open a terminal or an X11 xterm window and issue the following commands:
sudo ifconfig en0 down
sudo route flush
sudo ifconfig en0 up

In case the command line hangs after the flush command, just open a new terminal and run the last command from there. When you are done, you can close all terminals. If you are connecting with wireless, replace en0 with en1.


OpenVPN error: write UDPv4: Can’t assign requested address (code=49)

Directing all VPN traffic through the OpenVPN concentrator


It is necessary for some users to have all their traffic directed through the OpenVPN concentrator. The number one reason for such a configuration is to protect the HTTP traffic over unsecured WiFi (a.k.a. hotspots).


Add to the bottom of the connecting client’s configuration file (typically under /etc/openvpn/clients.d the following line:
push "redirect-gateway"