OSX: “Can’t assign requested address (code=49)”

Share Button

Commonly associated with OpenVPN issues, but also visible from cURL and other low level networking tools, this error occurs when  OSX’s TCP stack routing table has become corrupted. I have experienced this issue frequently when using OpenVPN on flaky WLANs. To fix it, you need to flush the routing table. Either reboot, or:

Where  en0 is the networking interface that caused this problem. Use  ifconfig -L to list your networking interfaces and figure out which one corresponds to WiFi/Ethernet. (Note:  en0 is typically Ethernet, but on MacBooks without hardware Ethernet,  en0 is WiFi.)