Problem
On Max OS X, when trying to connect to an OpenVPN gateway, you may encounter the following error:
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.
Solution
The routing table needs to be flushed on the interface used to connect to the Internet. Typically,
- : ethernet (wired) interface
- : 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:
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 with .
References
OpenVPN error: write UDPv4: Can’t assign requested address (code=49)