Skip to content

Instantly share code, notes, and snippets.

@boywijnmaalen
Last active November 8, 2018 06:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boywijnmaalen/fd441300621061473bd5b2235e442b29 to your computer and use it in GitHub Desktop.
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
# 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