4
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...
If your systems are all on the same network, why not simply use your link local addresses (fe80::/64) for communication? Or perhaps sign up for a hurricane electric account. They give you an allocation that is static. You could use that space in addition to the space you get from your ISP. – Zoredache – 2014-07-14T18:35:06.653
@AndréDaniel, how do you think HE address space would induce latency on connections between devices on the internal network? You don't even really need to have the HE tunnel enabled. I just mentioned HE, since it is a way to get a free public IPv6 allocation you could use for your internal network. – Zoredache – 2014-07-14T18:49:37.843
@Zoredache yeah sorry I misunderstood you, I was thinking about using the HE tunnel to replace the ISP-provided IPv6 and using it for external connections. – None – 2014-07-14T18:52:40.193
1Maybe use a cron job to check if the prefix has changed every hour and change the rule if that's the case ? – None – 2014-07-14T18:53:18.040
3Or generate a ULA prefix for internal use. That is usually easier than link-local addresses. – Sander Steffann – 2014-07-14T18:56:58.477
I would complain very loudly to the ISP. As a business you should be getting an IPv6 prefix that doesn't change if you need it (and you do). – Michael Hampton – 2014-07-14T21:29:37.140
Thanks for your hints. I need to clarify: this is not enterprise, it's for my home broadband access (cable), so no ISP that would allocate me a better address range. Using link-local addresses is bad because I'd like to access SSH on one machine from "outside" (internet) and therefore can't use the link-local address. – lynix – 2014-07-15T16:07:17.727