[How-to] Network between VMs

Original forum link
https://forum.qubes-os.org/t/37533
Original poster
Max123
Created at
2025-11-25 18:00:01
Posts count
2
Likes count
4
Tags
networking

Problem

During software development, I need a group of VMs that can access each other over the network, but remain isolated from the Internet. Many guides online are incomplete or confusing, so here’s a clean solution.

Solution Overview

Network Setup

Steps

  1. Set sys-firewall as network VM for all AppVMs in the group.
  2. Assign unique IPs for each AppVM (run in Dom0):
qvm-prefs my-vm ip 10.137.1.101
  1. Enable routing between all IPs in the range (run on sys-firewall):

Use this command (see below):

nft add rule ip qubes custom-forward ip saddr 10.137.1.0/24 ip daddr 10.137.1.0/24 ct state new,established,related counter accept

Make it permanent:

nft add rule ip qubes custom-forward ip saddr 10.137.1.0/24 ip daddr 10.137.1.0/24 ct state new,established,related counter accept
  1. Restrict Internet access (optional). For any VM you want to keep offline (as I do):
  2. Open Qube Manager -> Settings -> Firewall rules
  3. Check Limit outgoing connections to…
  4. Add exceptions if needed for intra-group communication.
  5. Reboot all VMs to make sure the settings apply and persist across reboots.