Skip to content

Instantly share code, notes, and snippets.

@sorz
Created June 1, 2014 18:54
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 sorz/b85bae86617ed03505a8 to your computer and use it in GitHub Desktop.
Save sorz/b85bae86617ed03505a8 to your computer and use it in GitHub Desktop.
#!/bin/sh
PPP_IFACE="$1"
PPP_TTY="$2"
PPP_SPEED="$3"
PPP_LOCAL="$4"
PPP_REMOTE="$5"
PPP_IPPARAM="$6"
if [ "$PPP_IFACE" = "ppp0" ]
then
ip rule del table outwall
fi
#!/bin/sh
PPP_IFACE="$1"
PPP_TTY="$2"
PPP_SPEED="$3"
PPP_LOCAL="$4"
PPP_REMOTE="$5"
PPP_IPPARAM="$6"
if [ "$PPP_IFACE" = "ppp0" ]
then
ip route add 8.8.8.8 dev $PPP_IFACE
ip route add default dev $PPP_IFACE table outwall
ip rule add fwmark 8 table outwall
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment