Skip to content

Instantly share code, notes, and snippets.

@jeffbrl
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeffbrl/3d431547fd6f58e340a7 to your computer and use it in GitHub Desktop.
Save jeffbrl/3d431547fd6f58e340a7 to your computer and use it in GitHub Desktop.
Script to configure IPv6 ND proxy
#!/bin/bash
#
# Jeff Loughridge
# July 2014
# jeffl at brooksconsulting-llc.com
# This script provides an example of setting up IPv6 static
# ND proxy entries. Edit the V6_START to match
# what you see in the DO control panel
V6_START=2a03:b0c0:1:d0::18:d000
# strip the last hex character
V6_MINUS_LAST_HEX_CHAR=`echo $V6_START|sed s/.$//`
# we'll skip the first /126 and use 0x4 to 0xF as the last
# hex character
ip addr add ${V6_MINUS_LAST_HEX_CHAR}4/126 dev docker0
echo "adding ND proxy entries..."
for character in 4 6 7 8 9 a b c d e f; do
echo "ip -6 neigh add proxy ${V6_MINUS_LAST_HEX_CHAR}${character} dev eth0"
ip -6 neigh add proxy ${V6_MINUS_LAST_HEX_CHAR}${character} dev eth0
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment