OpenBSD default gateway outside subnet

gatewayipv6networkingopenbsd

My ISP offers IPv6 by default. However, my ISPs IPv6 setup appears to be a bit strange because the default IPv6 gateway is located outside of my servers subnet. Under linux it is possible to setup a static route to that gateway using ip -6 route add <gateway ip> dev <interface>. However, this doesn't work on openbsd, does anybody know the equivalent of that command on openbsd or does anyone know know another approach to fix this problem?

Best Answer

Add the following to /etc/rc.conf:

ipv6_defaultrouter="<v6-gateway-ip>"

then reset networking by either rebooting or running

/etc/rc.d/network_ipv6 restart

Or you can do it by hand:

 route -n add -inet6 default <v6-gateway-ip>