Skip to content

Instantly share code, notes, and snippets.

@nabeken
Last active August 29, 2015 13:55
Show Gist options
  • Save nabeken/8754423 to your computer and use it in GitHub Desktop.
Save nabeken/8754423 to your computer and use it in GitHub Desktop.
#!/bin/bash
# wait for docker ready
sleep 10
FIRST=$(/sbin/ifconfig eth0 | grep -i global | awk '{ print $3 }' | cut -d":" -f1-4)
SECOND=$(/sbin/ifconfig eth0 | grep -i global | cut -d":" -f6,7,8,9 | cut -d"/" -f1)
IPV6=${FIRST}:a${SECOND}
for SUFFIX in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do
ip -6 route add "${IPV6}${SUFFIX}"/128 dev docker0
ip -6 neigh add proxy "${IPV6}${SUFFIX}" dev eth0
done
ip -6 route add default via fe80::1052:1 dev eth0
interface docker0
{
AdvSendAdvert on;
};
net.ipv6.conf.all.forwarding=1
net.ipv6.conf.all.proxy_ndp=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment