[solved] IPV6 selection

I am using my home router as SOCKS proxy via PuTTY. When I checked with whatismyip, I got this result:
immagine

Fun fact: this is the address of the "tun0" interface.

Couple of questions:

  1. how do I control which interface is used as source for the proxy?
  2. can I enable PE on this interface too?

It will be the same as the source interface for the router itself.

Change ip6ifaceid to random.

1 Like

I don't understand: I am connecting on IPV4 via the WAN interface, then there is the IPV6 address for the he.net interface (NOT 42) and the tun interface (42). I could understand if it picked the tunnel interface as outbound address but the tun0?

I don't have this keyword for the vpn and, besides, it probably should not use that interface anyway.... I think.
(EDIT: the IPV6 address for tun0 is controlled from the openvpn config, just like the IPV4 one)

Apparently the tun0 has precedence on the router. If you login by ssh to the router and check your IP it will match the IP you got earlier. wget -O - http://icanhazip.com
I guess you could change the metrics to influence the preferred interface.

It can happen if all default IPv6 routes are source-address dependent routes, which usually is the case on OpenWrt. The kernel then needs to select the source address before selecting the route, and it will use the first global IPv6 address that it finds which happens to be the tun0 address.
Add an IPv6 address which isn't part of an existing subnet to the lo interface (by creating an alias interface using the @loopback as ifname) if you want to use another IPv6 address. The lo interface is the first interface and will be preferred. Or you can try adding a default route via the HE tunnel without a from/source address. (I have read that it isn't recommended to mix source-dependent routes with other routes, but it may work anyway.)

1 Like

Sorry for the delay, I have just implemented your suggestion and tomorrow I'll try it out, thank you.
I'm curious to find out if the "lo6" IPV6 address will now be visible instead of that associated with the vpn or a temporary address will be used (much preferred)

EDIT: yup, now the "l06" address is visible. One step up but still not optimal.
Also, occasionally the vpn IP is still chosen. Weird.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.