Tethering with multiple phones

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.

Have you tried forwarding the phone to another qube using the Qubes device widget? I do this all the time with my phone on a custom sys-tether qube with network manager and no netvm and it works fine. In your case, you could create a few of them and attach the different phones to them and then connect any qubes you want for each network.

I saw mention of the device widget, but I couldn’t find it in 4.2, and the post I saw was maybe three years old. How does one get to it?

It should be there by default, it’s the little icon that looks like a USB stick in the widget menu (this is also where you control your disk attachments).

Ah, but where is this Widgets menu? I literally have not used this, I found a CLI thing to connect thumb drives …

It’s odd that you don’t have this. All Qubes related widgets are enabled and visible by default. Have you changed your desktop environment to something else like kde? You can always use the qvm-device cli to control your device from dom0, but it’s easier with the widget.

What’s the status of the device widget in dom0?

systemctl --user status qubes-widget@qui-devices.service

“The widgets are the little icons in the upper right hand portion of the screen.”

Found it and that command reports it is running. And nothing up there looks like a USB stick to sixty year old eyes :frowning:

It looks like this for me (sorry for the small size):
IMG

When you click on it, you should see a list of things starting with dom0: and/or sys-usb:

1 Like

That does the trick. Now that I know where it is, I’ll have another look at the instructions. Thanks.

1 Like