As many have noticed, in some circumstances some mobile networks have started handing out only IPv6 network addresses, such as on the Xperia 10iii with your SIM in slot 1. This isn’t as dramatic as it sounds - these networks also implement DNS64 to translate IPv4 into a v6 subnet that’s routed to the v4 internet through a NAT64 host, so for the most part you wouldn’t notice. However, for connecting to literal IPv4 addresses or supporting a v4 subnet for tethering/hotspot, that’s not enough.
That’s where CLAT comes in. It’s a mechanism for detecting when DNS64 is present, and translating IPv4 into IPv6 addresses on the NAT64 subnet, so IPv4 is available. This mechanism is implemented on later Android and iOS devices, but hasn’t been on Connman on SailfishOS, until now. Thanks to a monumental effort from Jussi, we now have an experimental new plugin for Connman which, along with a new package of Tayga, can detect NAT64 networks and create a CLAT interface that can be used for tethering. It’s not yet complete but is in a fit state for testing by brave community members.
NAT64 is a feature of only certain mobile providers, none of which are in Finland which makes testing difficult. I’m on one of those networks myself (Orange F) and can report it works well so far for me. But other networks may have different expectations that we’re don’t meet yet, so we need some broader testing.
If you would like to try out these beta packages, I’ve built it on the community OBS for aarch64 devices. Add this repository to your SSU config (with ssu ar <name> <url>
) and update. If you’re not familiar with how to do that, then please don’t try this. It probably won’t brick your device but you could end up having to reflash.
Don’t forget to remove the repo (with ssu rr
) before the next release. It will be removed from the OBS at some point, and you don’t want broken repos in your config.
If this works for you, please let us know. If not then some logs would be appreciated to help us improve this so we can get it into the next release. To enable logging for CLAT and related components in the journal, this needs to be in /etc/sysconfig/connman
:
SYSCONF_ARGS=-d plugins/clat.c -d src/tethering.c -d src/technology.c -d src/network.c -d src/nat.c
Then this script should collect the relevant info from your device and pack it up into an archive that you can send to us. Ask how on IRC, Telegram or here and we’ll figure something out. Run it at the point where everything should be working. Using USB networking is the best way to do this over ssh when your WLAN is off.
#!/bin/bash
TMPDIR="/tmp/clat/$(date +%Y%M%d_%H%M%S)"
ARCHIVE="$TMPDIR.tar.bz"
CLATCONF="/etc/connman/clat.conf"
echo "Gathering CLAT logs to $TMPDIR"
mkdir -p "$TMPDIR"
# journal
journalctl -b -u connman > "$TMPDIR/clat.connman.log"
# route info:
route -n > "$TMPDIR/clat.route"
route --inet6 -n > "$TMPDIR/clat.route6"
# device info:
ip addr show clat &> "$TMPDIR/clat.device"
# iptables:
iptables -L -v -n > "$TMPDIR/clat.iptables.filter"
iptables -t nat -L -v -n > "$TMPDIR/clat.iptables.nat"
ip6tables -L -v -n > "$TMPDIR/clat.ip6tables.filter"
# clat conf
if [ -f "$CLATCONF" ] ; then cp /etc/connman/clat.conf "$TMPDIR/" ; fi
tar cjf "$ARCHIVE" "$TMPDIR" 2>/dev/null
echo "Done"
echo "Send archive $ARCHIVE"