answered
2020-01-14 20:28:24 +0200
What do your IPv6 address look like ?
Depending on the way the IPv6 is handled at your ISP, it might be doable.
If IPv6 is done by having a single common(*) /64 prefix used by the cell service provider sent by RA (router advertisement) to the phone and the phone then subsequently using autoconfiguration (SLAAC State Less Address AutoConfiguration) (i.e.: adding its own Mac address-derived suffix or a random one).
Then you could use IPv6 Neighbourhood Discovery (ND) Proxy to make the IPv6 hosts on the local network (the Wifi and USB shared connection) visible on the wide network (the Modem connection) and simple routing to forward these various IPv6 accross the network.
If you want multiple devices (e.g.: Wifi and USB or multiple Wifi devices), you could come up with your own prefix that is a subset (e.g.: a /96 subset that is a subset of the /64 used on the ISP's network) and then run DHCPv6 on the Wifi/USB side, while still using NDProxy to make them visible on the outside and routing the traffic.
At one of my previous university jobs, I did deploy something along this lines to make a coupld of LXC containers on an internal bridge (not connected to ethernet, using its own Ipv4) visible to the uni's network on IPv6. (I used firewalld and dnsmasq for that).
(*) - Note this is similar of how you'll get IPv6 when connecting to some University wifi (Where your smartphone IPv6 is [Uni's prefix] + [SLAAC suffix selected by your phone]
And different to the suggestion of ibins where the cell service provider should give you a whole prefix to your phone (e.g.: each single smartphone gets its own specific /96 that exclusive to the phone and can be free to distribute the remaining /32 suffix freely, e.g.: by running DHCPv6) (or even getting a /56 prefix from the service provider that can be then split in multiple networks each supporting SLAAC - one sub /64 for your phone, one sub /64 for your shared devices, etc.).
You would need to set up a whole another network configuration stack. Sailfish default firewall rules block DHCPv6, thus breaking stateful IPv6 configuration, so you won't get delegation prefix. Even if you add allow rule to firewall, connman does not support DHCPv6, and if you use additional dhcp client for ipv6, something from sailfish immediately sends dhcpv6-release messages, and unbinds all gotten prefixes.
The only easy way to have ipv6 connectivity for tethering clients is to setup vpn server on the phone.
UPD: It's connman, who's sending dhcpv6-release, if interface configured by connman, you cannot use other configuration tools on it. And connman supports DHCPv6, but can't be configured to prefer it over SLAAC.
0xe4524ffe ( 2020-01-14 23:38:03 +0200 )edit