Internet connection sharing: no IPv6 on laptop

When I share my phone’s internet connection to my Linux laptop I don’t have ipv6 at all.

Apparently this has been a much-discussed topic, see:
https://together.jolla.com/question/95708/ipv6-connection-sharing/
https://forum.sailfishos.org/t/usb-tethering-on-xperia-10-iii/
https://forum.sailfishos.org/t/hotspot-not-working-10-iii

I currently don’t have another connection to test, but it’s pretty clear:

  • I can ping -6 ::1 but anything else gives “Network unreachable”
  • This is true if I choose “IP” or “Dual” in
    Mobile Network => Data access point => Protocol
  • If I choose “IPv6” I get no functional internet at all on the laptop

On the phone everything works as expected.

On the phone:

$> ip route
default via 10.163.241.194 dev rmnet_data0
10.163.241.192/30 dev rmnet_data0 proto kernel scope link src 10.163.241.193
10.163.241.194 dev rmnet_data0 scope link
62.241.198.245 via 10.163.241.194 dev rmnet_data0
62.241.198.246 via 10.163.241.194 dev rmnet_data0
172.28.172.0/24 dev tether proto kernel scope link src 172.28.172.1
$> ip -6 route
2001:14bb:c7:bcac::/64 dev rmnet_data0 proto kernel metric 256 pref medium
fe80::/64 dev rmnet_data0 proto kernel metric 256 pref medium
fe80::/64 dev tether proto kernel metric 256 pref medium
fe80::/64 dev rndis0 proto kernel metric 256 pref medium
default via fe80::9d59:3a8f:d053:b206 dev rmnet_data0 proto ra metric 1024 expires 64739sec hoplimit 255 pref medium

On the laptop:

$> ip route
default via 172.28.172.1 dev enp0s20u2 proto dhcp src 172.28.172.2 metric 100
172.28.172.0/24 dev enp0s20u2 proto kernel scope link src 172.28.172.2 metric 100
$> ip -6 route
fe80::/64 dev enp0s20u2 proto kernel metric 1024 pref medium

Is this still the status quo or can I do something to make the shared connection Dual as well?

FWIW, I had a good look in /etc/connman and /home/.system/var/lib/connman but found nothing that would explicitely disable IPv6, and this shows nothing that would explicitely enable a Dual connection.

BTW all this applies for a wifi hotspot just as much as for USB sharing.

So Android works like that too? Only IPv4 for shared connections, while both ipv4 and ipv6 workon the phone itself? And still does (I remember this fromalmost 10 years ago)?

I just wonder why, is there some technical limitation?

I also saw the whole CLAT discussion but I think it does not apply in my case - I can get both ipv4 and ipv6 internet to my phone.

And I am in Finland.

Tethering on Sailfish OS has no IPv6 support. CLAT has nothing to do with it. It is IPv4 only. IPv6 hasn’t been implemented even in upstream ConnMan, which handles this.

2 Likes

You mean IPv6 for shared connections? Well, that explains it.

Do you think it’s possible to sidestep connman and share the internet in a different way, at least via USB?

Yes, this exactly. Tethering does give only IPv4 addresses and sets up routes and NAT for IPv4. Somewhere in the future IPv6 support can be implemented. Or if someone wants to try out feel free to wander into ConnMan code…

If you want you can try as much as you are capable of. If you listen for the D-Bus property changed signal “Tethering” as a boolean value from connman/connman/doc/technology-api.txt at master · sailfishos/connman · GitHub and then in a script make the necessary changes to enable all the necessary bits for IPv6 in kernel and iptables, and then revert them when the property has changed back to “false”, we surely would like to see the process you managed to do. It would be then easier to include it into the codebase of ConnMan as well. There are other more urgent things to do and this is far from the top of the priority list.

1 Like

Thanks!

I think I’d sidestep connman completely and use udev to launch a script when a certain machine is connected via USB.

Not trivial for me though;

Depending on need, sometimes

ssh -D 1080 defaultuser@192.168.2.15

is enough – and then use socks protocol to connect from e.g. web browser
(hmm I don’t remember if ipv6 addresses are understood by socks5
(i think those are), but requesting socks server to resolve names to
ipv6 addresses would be enough)

1 Like