Created
June 1, 2014 18:54
-
-
Save sorz/b85bae86617ed03505a8 to your computer and use it in GitHub Desktop.
Scripts for https://sorz.org/p/openwrt-outwall/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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