2

I have a very particular wish.

I am my own network admin at home, so I can trust it and tweak it. I have a /48 with simply two /64 linked together by a router.

So I would like to use stable ipv6 addresses when talking inside my network, say, slaac or dhcpv6. That way, I will also have the local DNS working, so I know which machine connect to what.

But all the same, I wish to use privacy addresses when surfing the web.

Is that possible to make that sort of thing ?

Thanks for the help.

2 Answers 2

2

On linux (you don't say what kind og Unix you have, but Linux is the only one I've tried privacy extension addresses on, and only in compination with slaac) you normally end up having both a random address (as a new is configured regularly, you might have more, if open connections exists using an old one) and whatever slaac gave you. Then you can probably just do something like:

ip -6 route add <local-v6-net> dev <interface> src <slaac-address>

<local-v6-net> should end with ::/64 (or 48). It should be valid syntax, but apart from ip accepting it, I haven't tested it.

0
1

NB : I reply here to @Henrik, cause my comment is too long and complex. And, yes, you are right, I use Linux in the present case.

Actually this is great idea ! I have been looking and searching around that since I read your answer.

If I do nothing, the route used the anonymous addresses. So I add a route like you said. But then you should use a lower metric than 256, because otherwise it is still the system's table that get it :

[stephane@Jabberwocky all]$ ip -6 route 2001:...::/64 dev eno1  proto kernel  metric 256  expires 3598sec pref medium

So I use your command with a low metric :

[stephane@Jabberwocky all]$ sudo ip -6 route add 2001:...::/64 src 2001:...:fef6:d709 dev eno1 metric 128

But then, I wish to do it large: it should work for my whole /48 (behavior should remain the same as the computer uses a wired or wifi interface to access the net, only the address changes of course). If I set a route for a /48, it will have less priority than the one to /64 (rule of the more specific prefix). So I have to suppress the route to /64 and add a route to /48.

I hope you understand what I write.

(And I still don't see how I am going to make that work practically on the computer: looks like I have to launch a command after network is initiated)

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.