If OpenVPN down how to prevent any direct internet traffic (http or whole tcp) on MacOS except local network?


Just manually configure your IP address settings and remove the default gateway. When OpenVPN is up, you’ll be assigned that tunnel as the default gateway and when it’s down, it will fall back to the original settings where there isn’t one.

  • 1
    Can you edit your answer with some example, please? Thanks. – mature May 23 '20 at 17:18
  • Im not at my mac at the moment, so I don’t have anything to take a screen shot of. But go into network settings, and in the dropdown that says “DHCP”, select “Manual.” Put in your IP, your DNS, etc. just leave out gateway – Allan May 23 '20 at 17:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .