I'm running an AP that bridges traffic to my ISP. For various reasons, I'm running both IPv4 and IPv6 and I need to NAT traffic from the LAN to the ISP. For this reason,
The usual solution for periodically updating the IPv6 gateway address seems to be rtsold(8), but it also seems to be common knowledge that it does nothing when
After looking at the source for rtsold(8), I don't see any logic that actually changes routes. Instead, it seems like it just solicits an advertisement, and the kernel (or something else) updates the routes. (I had hoped that I could just hack rtsold(8) to make it ignore
In any case, it's been quite problematic to dynamically update the IPv6 gateway for my ISP. I ended up modifying
The hacked rtsold(8) is fine for now, but I really don't like running hacked base binaries. Is there a better way to go about this?
net.inet6.ip6.forwarding
needs to be enabled.The usual solution for periodically updating the IPv6 gateway address seems to be rtsold(8), but it also seems to be common knowledge that it does nothing when
net.inet6.ip6.forwarding
is enabled. I can confirm this by just toggling net.inet6.ip6.forwarding
: With it enabled I get NAT, with it disabled my default route gets a gateway address.After looking at the source for rtsold(8), I don't see any logic that actually changes routes. Instead, it seems like it just solicits an advertisement, and the kernel (or something else) updates the routes. (I had hoped that I could just hack rtsold(8) to make it ignore
net.inet6.ip6.forwarding
.)In any case, it's been quite problematic to dynamically update the IPv6 gateway for my ISP. I ended up modifying
rtsol.c
so that it passes the sender's address to the -M
script as an extra argument, and then I have a script that calls route -6 change default $addr
to set the gateway. I also tried route6d(8), but it was hard to tell if my config was bad or if it's also the wrong tool.The hacked rtsold(8) is fine for now, but I really don't like running hacked base binaries. Is there a better way to go about this?