Skip to content

Instantly share code, notes, and snippets.

@mreram
Created March 27, 2021 19:32
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 mreram/30734eccc774054b61712275de1b0c61 to your computer and use it in GitHub Desktop.
Save mreram/30734eccc774054b61712275de1b0c61 to your computer and use it in GitHub Desktop.
by pass an ip through vpn in ubuntu
DEV=enp4s0
GW=$(ip route list | sed "s/.* via \([0-9.]*\) dev $DEV.*/\1/;t;d"|head -1)
route add -host git.mycompany.com gw $GW $DEV
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment