"Cannot Allocate Memory" error when trying to ssh or ping or curl due to unrelated vpn?

Solution 1:

Quote from this apple forum post

Try following:

Methind 1

  1. ensure you have admin access
  2. go to system preferences
  3. click on network
  4. select Wi-Fi
  5. select advanced button (at the bootom right of the screen, before the "?" sign)
  6. select tcp/ip tab
  7. disable and enable tcp/ip

Method 2

sudo route delete -host 128.0.0.0