How to connect to usb tethering of my mobile to sys-net qube

102 views
Skip to first unread message

acharya.sa...@gmail.com

unread,
Feb 20, 2019, 11:35:29 AM2/20/19
to qubes-users
I understand that the other VM which have firewall as their NetVM get the network which gets filtered through firewall VM to secure the system. The firewall system in turn receives network from sys-net. I connected my mobile and flipped the switch of USB tethering but am not sure how to configure it.

I'm at the network connection page of sys-net where I need help of how to configure the network.

There's not any material related to qubes USB tethering elsewhere.

Stuart Perkins

unread,
Feb 20, 2019, 2:51:39 PM2/20/19
to qubes...@googlegroups.com
Qubes passes network activity ultimately through sys-net. Sys-net is just a virtual machine with access to the network devices. This means that in order to use a usb tethered phone as a network device, the sys-net vm must have access to the usb device the phone is connected to. If you have sys-usb implemented, it means assigning the device via qvm-usb. If not, it means assigning the usb hub at the qubes manager level...which will make other devices on the same hub inaccessible to other VMs.

Stuart
Qubes 3.2 user...

acharya.sa...@gmail.com

unread,
Feb 21, 2019, 8:25:52 AM2/21/19
to qubes-users
I don't have a sys-usb. If I assign my usbs to sys-usb, then how will the net VM have access to it?
Also according to Joanna here, networking stacks lie in NetVM
https://blog.invisiblethings.org/2017/10/03/core3.html
So I want to move my USB bus of the mobile connection to sys-net. When I tried the command

qvm-pci -a sys-net 08:00.3
which is the address of my usb bus, it shows error regarding 'sys-net'

Also,
Under dom0, when I execute commmand
qvm-block
With tethered usb it doesn't show any device and without tethered usb, it shows

dom0:sr0 File-Stor_Gadget (CDROM)
which means once I start tethering, the USB connection somehow dissappears.

Thanks Stuart

Stuart Perkins

unread,
Feb 21, 2019, 9:13:47 AM2/21/19
to qubes...@googlegroups.com
If you implement sys-usb, it allows you to assign each device to other app or system vm's. This way you could assign your usb network device to sys-net and your storage device to another appVM. If you need to separate multiple devices on the same usb hub, this may be the only way.

Stuart

unman

unread,
Feb 22, 2019, 6:31:50 AM2/22/19
to qubes-users
Are you trying to attach pci device to a running sys-net? Dont.
(What was the error you got?)

qvm-block shows (as the name suggests) block devices.
qvm-usb or qvm-device may be of more help in this context.
Post output from those commands tethered and non-tethered.

acharya.sa...@gmail.com

unread,
Feb 22, 2019, 11:16:01 AM2/22/19
to qubes-users
Stuart, I read things on tethering earlier and there's no clear indication that the people were able to solve the problem and get the connection. So I have ordered a WiFi adapter and I'll install it in a couple of days reading relevant sources. Regarding USB, there's a nice GUI + sign tool on top right corner in R4 which I intend to use and nothing more. Once you plug in a USB device, it is detected in the tool and I'll distribute the trusted and untrusted ones in different qubes.
Also, I have 8 usb buses. So I can use different ones to connect to different VMs.

unman, there's no difference in both responses tethered and untethered here. I executed qvm-usb and qvm-device ls
Got

BACKEND:DEVID DESCRIPTION USED BY
&
Got empty response from qubesd. See journalctl in dom0 for details

respectively. Why don't I connect devices to sys-net? Again quoting the Joanna article above.

acharya.sa...@gmail.com

unread,
Feb 25, 2019, 12:02:34 PM2/25/19
to qubes-users
This is harder than it looks guys. I got my WiFi adapter today.

I found out that sys-net already has USB 2.0 assigned in it(Bus 001). lsusb under sys-net gives them. I plugged my wifi adapter in 2.0 USB (Bus 001) still I don't get any connection.

I tried making sys-wifi assuming sys-net will have some incorrect settings but when I try to attach the USB device to it, it shows
backend vm 'dom0' doesn't expose device 'PCIaddressOfUsb'

I really don't know how to proceed. It should atleast show the device. Why aren't any USB devices not linked to storage recognized?

Is my device there? Do I need to install it's drivers?

acharya.sa...@gmail.com

unread,
Feb 25, 2019, 12:08:37 PM2/25/19
to qubes-users

*not recognized
I found Bus 001 Device 002 is RaLink ... under dom0 and
ID 0627:0001 Adomax Technology Co., Ltd under sys-net

acharya.sa...@gmail.com

unread,
Feb 25, 2019, 3:03:28 PM2/25/19
to qubes-users
Solved the tethering problem.

Stuart pointed the solution out but I used it after understanding a few things. Tethering is automatically configured by the qube in which the USB bus exists. So, we just have to make sure that the USB exists in that VM. I made sys-usb because I didn't think sys-net was preconfigured well. Maybe it was, I didn't try.

Go to dom0. In terminal use lsusb and figure out the bus on which your usb device(tethering mobile connection) is. My was on bus 1. I made sys-usb, shut it down, under it's settings, went to advanced changed it to HVM, went to devices, located the PCI address of my USB port (shown in https://www.qubes-os.org/doc/assigning-devices/ ), selected it, pressed the greater than sign. Goes to right side. Reset PCI Device(selected one). Restart VM. Assign it as sys-firewall's NetVM. Tethering switch. Boom! Tethering done!

I'll do the adapter configuring soon.

Reply all
Reply to author
Forward
0 new messages