Is there any workaround for dealing with IPV6 changing addresses on traffic rules?

I have a traffic rule that allows me to access a Linux machine in my house over SSH as the following:

It works fine. However, if my ISP router (in bridge mode) restarts, the IPV6 of my Linux machine will also change. I know I can configure a DNS on the server with a dynamic IPV6 service as ... But that won't solve my issue on my OpenWRT router since it has a traffic rule pointing to a hardcoded IPV6 address, if the IPV6 changes, I need to manually change it to a new IPV6 using the OpenWRT interface. At least on the Luci interface, it doesn't accept traffic rules with DNS addresses. What's the workaround for this problem? Is there any way of making a traffic rule that will persist even when its IPV6 changes?

If you assign a static DHCPv6 address, you can specify the host portion of the IPv6 address with a negative mask so only the host portion is checked. For example, ::dead:beef:cafe/-64 would match that address regardless of the current prefix.


Thanks! At first, I thought about creating a script to modify the configuration files... But this way is lot simpler.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.