Skip to content

Instantly share code, notes, and snippets.

@n0ts
Created November 26, 2012 03:39
Show Gist options
  • Save n0ts/4146487 to your computer and use it in GitHub Desktop.
Save n0ts/4146487 to your computer and use it in GitHub Desktop.
/etc/ppp/ip-up
#!/bin/sh
PATH=/bin:/sbin:/usr/bin:/usr/sbin:$PATH
IFACE="$1"
IPADDR="$4"
GATEWAY="$5"
DEFAULT_GATEWAY="$6"
case "$IFACE" in
# VPN
"ppp0")
#
# Hoge network
#
if [ "$GATEWAY" == "x.x.x.x" ]; then
route add -net y.y.y.y/x.x.x.x
fi
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment