Last active
November 8, 2018 06:14
-
-
Save boywijnmaalen/fd441300621061473bd5b2235e442b29 to your computer and use it in GitHub Desktop.
How to let websites and IPs bypass the VPN using static routing #UNIX #MacOsX
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://support.hidemyass.com/hc/en-us/articles/202720646-How-to-let-websites-and-IPs-bypass-the-VPN-using-static-routing | |
# get gateway IP | |
``` | |
$ route -n get default | grep gateway | awk '$1 == "gateway:" {print $2}' | |
``` | |
# for every IP add an exception to route config | |
``` | |
$ sudo route -nv add <destination IP> <gateway IP> | |
``` | |
# delete all route config for a specific gateway | |
``` | |
$ sudo route -n delete default -link <gateway IP> | |
``` | |
# helpful commands; | |
# the following command will show the existing routing table (IPv4 only): | |
``` | |
$ netstat -nr -f inet | |
``` | |
# the following command will show you how a specific host will get routed: | |
``` | |
$ route get HOSTNAME_OR_IP | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment