DISCLAIMER: All code was written by AI. Reviewed and tested by me.
I wanted to give my computer and phone the same Tor or VPN connection my Qubes setup uses, over a USB Ethernet cable. So I made a script that turns a dedicated qube into a router. You plug a USB Ethernet adapter or a USB Wi-Fi dongle into the qube, and the device on the other end gets online through that qube’s NetVM (a VPN, Whonix/Tor or sys-firewall). sys-net isn’t touched.
Once it’s installed there’s nothing else to do: adapters and dongles are picked up when you plug them in. A Wi-Fi dongle that supports access point mode becomes a hotspot automatically. Devices are blocked from your other qubes and private networks by default. tether status shows what’s connected.
Sharing it in case it’s useful to someone else.
You can download it from GitHub here: GitHub - johndxy/qubes-tether-vm · GitHub
Tested on
Qubes OS 4.3.2 with debian-13-xfce and fedora-43-xfce, as a standalone qube, as a template with an AppVM based on it, and as a disposable qube. Tested with a plain USB-to-RJ45 cable, a USB hub with an Ethernet port and a Wi-Fi hotspot, with a VPN qube and sys-whonix as the NetVM.
It would be really helpful if people tested it, especially under heavy load with lots of machines and over longer periods, days or weeks. Feedback is welcome here on the forum or on GitHub, and issues and pull requests are welcome too.