Use address in “Routed IPv6 Prefixes” as default outbound address when using HE.net’s tunnel broker

By default Linux (randomly?) chooses “Client IPv6 Address” (given by HE.net) as source address for outbound connections. This can be inconvenient sometimes tough.

To override this, it’s possible to add a new address in “Routed IPv6 Prefixes” to eth0 in /etc/interfaces.d/eth0 …:

… and abuse the definition of an IPv6 home address to override this with:

To persist it, one can add a post-up command in /etc/network/interfaces.d/eth0:

Edit: At first I tried to add a script to /etc/network/if-up.d with:

It leads to failure in starting networking.service with RTNETLINK answers: File exists, though. I think the reason it failed was that I should have tested interface name before setting the address as home address. Using post-up command saves life here.

Leave a Reply

Your email address will not be published.