Default IP ranges for sys-firewall, AppVMs, etc

Thanks for the pointer @Zrubi!

I think I found where the IP addresses that I see some from :slightly_smiling_face:
For future reference: a NetVMMixin is defined in qubes-core-admin. That module defines two methods: get_ip_for_vm and get_ip6_for_vm (source).

The first method builds IPv4 addresses in the following ranges:

  • 10.138.xxx.xxx (for DispVMs)
  • 10.137.xxx.xxx (otherwise)

Just in case anyone wonders, the ranges in IPv6 are defined by the second method as follows:

  • yyy::a8a:xxxx (for DispVMs)
  • yyy::a89:xxxx (otherwise)

In those patterns, yyy is a “Qubes-specific site-local prefix” and xxxx is an hexadecimal representation of the xxx.xxx you got in IPv4. (Note that a8a and a89 are the hexadecimal representations of 10.138 and 10.137 respectively, so you get a “matching” IPv4 and IPv6 for any given VM.)

4 Likes