Commit 8f3c30c7 authored by nanahira's avatar nanahira

give route only for v6

parent 7fbb7fa3
......@@ -14,3 +14,5 @@ ip rule del pref 100 fwmark $INIT_ID lookup $INIT_ID
ip -6 rule del pref 100 fwmark $INIT_ID lookup $INIT_ID
ppp_origin -D "$PPP_IFACE"
true
......@@ -12,9 +12,13 @@ iptables -t nat -o "$PPP_IFACE" -A POSTROUTING -j MASQUERADE
ip route add default dev "$PPP_IFACE" table $INIT_ID
ip route add default dev "$PPP_IFACE" metric $INIT_ID
ip -6 route add default dev "$PPP_IFACE" table $INIT_ID
ip -6 route add default dev "$PPP_IFACE" metric $INIT_ID
ip rule add pref 100 fwmark $INIT_ID lookup $INIT_ID
ip -6 rule add pref 100 fwmark $INIT_ID lookup $INIT_ID
ip -6 addr show dev "$PPP_IFACE" | grep "inet6"
if [[ "$?" == 0 ]]; then
ip -6 route add default dev "$PPP_IFACE" table $INIT_ID
ip -6 route add default dev "$PPP_IFACE" metric $INIT_ID
ip -6 rule add pref 100 fwmark $INIT_ID lookup $INIT_ID
fi
ppp_origin -A "$PPP_IFACE"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment