Skip to content

Instantly share code, notes, and snippets.

@ajoydas
Created February 26, 2021 14:39
Show Gist options
  • Save ajoydas/ecd97e8e755be0a292154b9a9cc728b7 to your computer and use it in GitHub Desktop.
Save ajoydas/ecd97e8e755be0a292154b9a9cc728b7 to your computer and use it in GitHub Desktop.
# use `route -n` to debug route table
# the nameservers may change which can create issue
Gateway=`ip route show 0.0.0.0/0 dev ppp0 | cut -d\ -f3`
echo Found Gateway: $Gateway
sudo route del -net 0.0.0.0 netmask 0.0.0.0 dev ppp0
# Route for cluster access
sudo route add -net 136.159.79.0 gw $Gateway netmask 255.255.255.0 dev ppp0
# Routes for nameservers
sudo route add -net 136.159.1.21 gw $Gateway netmask 255.255.255.255 dev ppp0
sudo route add -net 136.159.34.201 gw $Gateway netmask 255.255.255.255 dev ppp0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment