IPv6: Setting the source address to use

With enabled IPv6 privacy extensions MacOS will generate at least two IPv6 addresses: The secured and temporary one. So far so good. MacOS is using the temporary address to initiate connections. However I'd like to tell MacOS to use the secured address for some destinations. On linux it's pretty easy:

ip route add theprefix via gatewayaddress src thesecuredaddress

I'm struggling to implement the same on MacOS. I tried it with the route command, but it seems like you can't specify the source address there. My hope was to find some answers in the FreeBSD handbook. I googled around and found this. Reading 8.1.1.6. Source Address Selection the first point mentioned is "If the source address is explicitly specified by the user (e.g., via the advanced API), the specified address is used.".
So FreeBSD seems to support it via the "advanced API". I hope that means MacOS is also supporting it. However I was not able to find the magic "advanced API". I hope somebody here can point me in the right direction. Thanks in advance!

Posted Nov 3, 2019, 10:36 PM UTC

10

No comments yet

Nobody commented on this post, or the comments weren't captured.