Disconnect MAC OSX INTERNET when VPN dies or disconnects.
Last updated by Shayne M on May 21, 2013 19:18
Disable internet.
Open Finder, Goto Utilities, Open Terminal
Tunnelblick:
type in the following sudo nano /Applications/Tunnelblick.app/Contents/Resources/client.up.tunnelblick.sh
VPNSecure App:
type in the following sudo nano /Applications/VPNSecure.app/Contents/Resources/client.up.sh
Under the following lines
ARG_RESTORE_ON_WINS_RESET="false"
ARG_TAP="false"
ARG_IGNORE_OPTION_FLAGS=""
Type this.
route delete default
The whole code block should look like the below
ARG_RESTORE_ON_WINS_RESET="false"
ARG_TAP="false"
ARG_IGNORE_OPTION_FLAGS=""
route delete default
- Press Ctrl+o
- press Enter
- Press Ctrl+x
Once you have done that, you will not be able to access the internet after you disconnect from Tunnelblick.
Enable Internet
There are two options. Options 1 requires you todo this before you connect and disconnect, however once you know the Gateway value you will not have todo it again.
Option 1:
in the Terminal window, type in route -n get default
Find the line that says gateway: x.x.x.x
This IP address is your default gateway IP, most home routers are generally set something like this... 192.168.1.1
Once you have the default Gateway IP address, type in the following sudo route add default 192.168.1.1 replace 192.168.1.1 with the Gateway IP from the route command above.
You will instantly have internet back again.
Option 2:
Disconnect from your Wifi or Ethernet connection and connect again.
VPNSecure Provides Secure VPN servers in over 45+ Countries
If you are a looking for a versatile easy to use VPN service, checkout Today