Skip to content

Instantly share code, notes, and snippets.

Last active May 8, 2020 17:24
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Find the default IPv6 gateway and start forwarding traffic on OpenBSD and Comcast (XFinity)
# This should set up ipv6 on XFinity or Comcast on OpenBSD 6.1
# Stop everything
/usr/bin/pkill dhcp6c
route -qn delete -inet6 default
ifconfig $egress -inet6
# Turn on autoconf so we can find our default gateway
/sbin/ifconfig $egress inet6 autoconf
# Wait until we get a gateway
while [ -z "$gateway" ]; do
sleep 1
gateway=$( route -qn get -inet6 default | awk '/gateway/ { print $2 }' )
# Now, add the default gateway statically,
# for reasons I don't understand
route -qn add -inet6 default $gateway
/usr/local/sbin/dhcp6c $egress $internal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment