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
npm i, composer install...), use a disposable VM and copy the resulting code back to your dev VMs. Spoiler: it's still insecure (this is a separate topic for discussion).Network Setup
10.137.x.x IP range, with 10.137.0.x assigned by DHCP.10.137.1.x for manual IP assignment in your dev group.Steps
sys-firewall as network VM for all AppVMs in the group.qvm-prefs my-vm ip 10.137.1.101
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:
/rw/config/rc.local in default-dvm (template for disposable VM).Option 2: Clone default-dvm -> sys-firewall-dvm, add the line there, and set sys-firewall-dvm as the template for sys-firewall.
Allow server VMs to accept connections. On each VM running a server, add to /rw/config/rc.local:
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