Post

The Network in QubesOS – Architecture, Routing, and Real-World Tests

The Network in QubesOS – Architecture, Routing, and Real-World Tests

“A deep dive into QubesOS network isolation and how to verify your VPN, TOR, and inter-VM firewalling actually works.”


📝 Introduction

I began my IT career as a client/server programmer before transitioning into Linux system administration. More recently, I’ve been focusing on deepening my knowledge of networking — an area filled with concepts like subnetting, CIDR, ingress, egress, MTU, and VLANs. At first, these felt like abstract jargon. But as the landscape of cybersecurity evolves, the importance of understanding these fundamentals has become crystal clear.

AI has radically accelerated the pace of threat evolution. Modern attacks aren’t just faster — they’re adaptive, capable of learning and pivoting in real time. Defensive systems can barely log a packet before the threat has already morphed. In this new environment, more detection isn’t the answer. Architecture is.


🔖 Table of Contents

  1. Introduction
  2. QubesOS Networking Basics
  3. My Setup Overview
  4. Network Flow and Egress IP Mapping
  5. Security Verification Tests
  6. Firewall Log Example
  7. Diagram: Visualizing the Network
  8. Lessons Learned & Tips
  9. Conclusion

QubesOS embraces that philosophy

QubesOS embraces that philosophy. It doesn’t rely on the hope that software won’t break — it assumes compromise is inevitable and minimizes the impact. Each virtual machine operates as an isolated zone, with tightly controlled networking where every packet must earn its way out.

Over the past few weeks, I’ve been putting that model to the test: tracing VPN, TOR, and firewall flows, verifying isolation boundaries, and looking for weaknesses. This isn’t just another lab experiment — it’s a real-world exploration of how we can build AI-resilient containment systems. Architectures that adapt as fast as the threats they’re designed to survive.

🌐 QubesOS Networking Basics

QubesOS works by splitting your computer into separate compartments, each with its own virtual network connection. Only one part of the system is allowed to talk directly to the physical network, and it passes network access to the others, acting like a secure gatekeeper.

ComponentDescription
sys-net- Connects directly to the physical network interface.
- Provides NAT and internal IPs to other VMs.
- Subnets the internal network for isolation.
- From the outside, all traffic appears to come from sys-net.
sys-firewall- Filters traffic between AppVMs and sys-net.
- You can view its firewall rules with:
bash<br>qvm-firewall sys-firewall<br>
- Uses QubesOS qvm tools for rule management (more in future articles).
sys-vpn- Clone of sys-net with OpenVPN configured.
- VPN starts automatically on boot.
- Any VM using sys-vpn routes traffic through the VPN.
sys-whonix- Routes network traffic through the Tor network.
- Provides anonymity for VMs using it.
- Some websites may block or restrict Tor traffic.

📡 Network Flow and Egress IP Mapping

  • I ran test to find out what the IP address were assigned to the differet network interface and proxies

| VM | Internal IP | NetVM Used | External IP | | ———— | —————- | ———— | ————- | | sys-net | 172.20.10.3/28 | (physical) | 199.189.94.43 | | sys-firewall | 10.138.22.13 | sys-net | 199.189.94.43 | | work | 10.137.0.15/32 | sys-firewall | 199.189.94.43 | | untrusted | 10.137.0.16/32 | sys-firewall | 199.189.94.43 | | sys-vpn | 10.137.0.26/32 | sys-firewall | 45.84.107.74 | | whonix | 10.138.38.126/32 | sys-whonix | 45.148.10.111 |

  • Notice the IP address for the proxies have a /32 which can’t assign another host inside that subnet.

🔒 Security Verification Tests

Add hands-on tests you performed and their results:

TestSteps PerformedExpected OutcomeResults / Notes
1. Inter-VM Isolation- Trace route from workuntrusted
- Checked IP s
Traffic should be blocked by firewall✅ Traceroute gets to firewall no other IP found
2. VPN Leak Test- Checked external IP with curl ifconfig.me
- Disabled VPN to test failsafe
No traffic should leak real IP✅ VPN enforced

Checked external IP with curl ifconfig.me
- Disabled VPN to test failsafe
3. Tor Verification- Launched browser in Whonix VM
- Checked IP at check.torproject.org
Traffic should route through Tor✅ IP recognized as Tor exit node
4. DNS Leak Check- Ran dnsleaktest.com from VPN and Whonix VMsDNS should resolve only via VPN or Tor✅ No ISP or local DNS leaks detected

✅ Conclusion

After weeks of tracing traffic, logging drops, and intentionally breaking things, one truth stands out: Qubes doesn’t try to stop compromise — it limits the blast radius. That containment mindset is the pattern cybersecurity needs as threats accelerate.

I’m still in the probing phase — mapping how these design principles might translate beyond Qubes into more adaptive, automated defenses. If you’ve experimented with similar setups or uncovered unexpected behaviors, I’d love to hear about them. Drop your observations, scripts, or lessons learned in the comments or DM me — I’m collecting real-world trade-offs and community insights for a follow-up piece.


🧭 Why this works

  • Keeps your “architect’s authority” while emphasizing openness and exploration.
  • Signals you’re leading a conversation, not pitching a product.
  • Invites contributions that double as market research and audience building.
  • Perfect tone for both LinkedIn (professional collaboration) and Facebook groups (peer discussion).

Would you like me to show you how to write a LinkedIn post caption that introduces this article using the same “probing phase” tone — something that’ll encourage thoughtful comments instead of quick likes?

🧾 QubesOS Networking & Security Command Cheat Sheet

Useful commands for inspecting and verifying network routing, VM isolation, VPN status, TOR routing, and firewall rules in QubesOS.


CategoryCommandDescription / PurposeNotes / Output
🔍 External IP Checkcurl ifconfig.meShows the public IP the VM presents to the internetUse in AppVM, VPN, or Whonix to verify IP
🌐 List VMs & NetVMsqvm-ls --networkLists all VMs and their associated NetVMsUseful to audit routing setup
🧭 Inside a VM: Interfacesip aDisplays IP addresses and interfaces (e.g., eth0, vifX.0)Helps verify internal networking
🗺️ Trace Routetraceroute google.comShows the path packets take to reach a destinationGood for identifying proxy hops
🔐 View Firewall Rulessudo iptables -L -v -nLists active firewall rules in sys-firewallRun in the ProxyVM
📋 Log Dropped Packetssudo iptables -I FORWARD -j LOG --log-prefix "QUBES DROP: " --log-level 4Adds logging rule to firewallUse with journalctl to monitor
📜 View Logged Dropssudo journalctl -k -fLive log view of dropped packets & kernel messagesRun in sys-firewall
🧱 Show a VM’s NetVMqvm-prefs <vm-name> netvmDisplays which NetVM a VM usesExample: qvm-prefs work netvm
🔁 Change NetVMqvm-prefs <vm-name> netvm <new-netvm>Routes VM through a different NetVMExample: qvm-prefs work netvm sys-vpn
🌐 DNS Leak Checkdig @resolver1.opendns.com myip.opendns.comResolves IP via specified DNS serverUseful for VPN/TOR DNS validation
🧰 Restart Firewall Servicesudo systemctl restart qubes-firewallReloads the firewall service in ProxyVMClears and reapplies rules
🚦 Check VPN Tunnelip a\| grep tunVerifies if VPN tunnel (e.g., tun0) is activeRun in sys-vpn
🛑 VPN Kill Switchsudo iptables -A OUTPUT ! -o tun0 -m conntrack --ctstate NEW -j DROPBlocks traffic outside the VPN tunnelAdd to sys-vpn for safety
🧱 Export Firewall Rulessudo iptables-saveDumps all iptables rules to stdoutUseful for backup or audits
🔒 Verify TOR Routingcurl https://check.torproject.orgConfirms you’re using the TOR networkRun in Whonix AppVM
📁 Save as Filecat > qubes-net-cheatsheet.txt <<EOF ... EOFSave this cheat sheet to a file in a VMReplace with actual content
This post is licensed under CC BY 4.0 by the author.