Skip to content

Instantly share code, notes, and snippets.

@metowolf
Created July 28, 2016 04:06
Show Gist options
  • Save metowolf/b2213bc0f8e23019ab14f83a834154dd to your computer and use it in GitHub Desktop.
Save metowolf/b2213bc0f8e23019ab14f83a834154dd to your computer and use it in GitHub Desktop.
#/bin/ash
line=0
while [ $line -eq 0 ]
do
sleep 10
line=`route -A inet6 | grep ::/0 | awk 'END{print NR}'`
done
ip6tables -t nat -I POSTROUTING -s `uci get network.globals.ula_prefix` -j MASQUERADE
route -A inet6 add 2000::/3 `route -A inet6 | grep ::/0 | awk 'NR==1{print "gw "$2" dev "$7}'`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment