Skip to content

Instantly share code, notes, and snippets.

Last active May 8, 2020
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