Skip to content

Instantly share code, notes, and snippets.

@sorz
Created Jun 1, 2014
Embed
What would you like to do?
#!/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