I have been utterly dreading having to get USB tethering of phones working, but tonight was THE night to get it done. I’m pleasantly surprised by what I’ve found.
I opened up a terminal for sys-usb and ran dmesg -w as root. I attached a phone, turned it on, and saw immediate signs of life. Making the network portion behave required restarting sys-usb so it would do its network related startup tasks.
I’ve encountered one oddity thus far. When I curl ifconfig.me in the terminal for sys-usb, it reports an IPv6 address, which is what I expect with the phone I’m using. When I curl ifconfig.me from a terminal in a VM set to use sys-usb to provide network, I get an IPv4 address. The IPv4 is from the carrier, I just find it odd that everything else I’ve ever done with tethering has got IPv6 except this one instance.
Problem: how to handle multiple phones?
I have several phones that offer wifi hotspot and USB tethering, one is mine, the others are client related devices that only use the cellular network, they’re never attached to my house or office wifi. They might go on a client’s wifi network, but that’s pretty rare.
I want to be able to create a client oriented VM, create a clone of sys-usb that will only work with ONE phone, and have that be the network for the VM. My personal device is attributable to me, the client phones are prepaid units funded with cash. I would need to do something extraordinarily provocative for some entity to put out the effort required to penetrate such measures, and since my use is innocuous, that shouldn’t be an issue.
Is there an existing procedure to do this? Or do I need to create a script to manually add only one single phone for each sys-usb type VM? I need “fail closed” here - these phones all live in similar black leather wallets, I can never have a situation where I plug in the wrong one, start doing stuff, and later notice the mistake.
I suspect I get to do a little bit of code here, but given there are so many slick features in Qubes I thought I’d ask first.