My ISP provides me with native IPv6 (unfortunately DS-Lite for v4) and I'm using SLAAC for the clients in my local network behind a broadband router.
As I don't trust the router (which is configured by my ISP over TR-691) I have set up ip6tables rules on every client, e.g. limiting SSH access to stations in the same subnet:
$ ip6tables -A services -s 2a02:8071:28c2:5400::/64 -p tcp --dport 22 -j ACCEPT
The problem now is that the prefix changes periodically, approx. once a month.
Is there an ip6tables statement that dynamically matches the current prefix(es) of a given interface?
Or how would you handle the changing prefix? I thought of writing an init script that first determines the current prefix through Router-Solicitation an then generates the appropreate ip6tables rules. But this sounds dirty somehow...