I would like to prevent my real IP address from leaking to websites that I visit using Safari on OS X.

Do i need to configure my firewall? How ? What if my VPN connection accidentally drops? Is there anything else to worry about that could leak my real IP?

  • The VPN should modify your routing table, so that all outgoing traffic to (default route) goes via VPN, and to your VPN it goes via your standard router IP e.g. It may depend on what VPN software you are using. If it's not happening, you can run post-VPN script to enable it. See netstat -nr to view your routing table. If you would configure such routing table permanently, you'd be normally able to connect to VPN only and reach the reast of the internet via VPN only.
    – Aria
    Commented Jul 31, 2016 at 21:55
  • So instead of using DHCP, you can configure static IP address with static route only to your VPN and no default route at all. So after booting your system and establishing your LAN connection, you can reach only VPN. That's just the basic option without firewall. In more complex situations like public WIFI you might setup firewall.
    – Aria
    Commented Jul 31, 2016 at 21:56
  • 3
    Please do not post the same question on multiple StackExchange sites apple.stackexchange.com/q/247861/145449
    – techraf
    Commented Aug 1, 2016 at 0:09

1 Answer 1


Your IP can leak in a number of ways, but commonly through DNS or WebRTC. The first step would be to identify a leak using websites like DoILeak or DNS leak test. Then take it from there - make sure you're using the correct DNS servers, disable WebRTC (though AFAIK Safari isn't vulnerable), and so on.

A very quick Google search came up with some good results, for example this guide to IP leaks.

You must log in to answer this question.

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