Last active
August 29, 2015 13:55
-
-
Save nabeken/8754423 to your computer and use it in GitHub Desktop.
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/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 |
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
interface docker0 | |
{ | |
AdvSendAdvert on; | |
}; |
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
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