Open tlaurion opened 4 years ago
I would love to re-add that feature. If someone has working code, I am happy to review and merge it.
This is very complicated to do because it requires chaining ARP / NDP between VMs. Id est if you have this:
physlaptop <-> netvm <-> another netvm <-> appvm
To get physlaptop to talk to appvm
, not only does another netvm
need to proxy ARP appvm
, netvm
also needs to proxy ARP appvm
, add firewall rules to permit traffic towards appvm
, and add routing table entries that point to appvm
to the right network interfaces.
By design in Qubes OS, netvm
does not have any visibility into where netvm
is attached. Nothing is preventing the code in the qubesnetworkserver
module (installed in dom0) from telling each NetVM proxy ARP these addresses in addition to your immediate attached VIFs, or telling those same NetVMs hey, you also need to add forwarding rules for the following IPs in addition to your immediate attached VIFs... but this sort of thing is actually quite tricky to get right.
Ultimately, it all comes down to making the qubesnetworkserver
qubesd plugin boss the qubesroutingmanager
on each NetVM around. So if dom0 wanted to tell the entire downstream topology to each and every NetVM that needed to know it, sure, that would work.
Oh, and there's routing tables to manage too.
It's not easy.
This is very complicated to do because it requires chaining ARP / NDP between VMs. Id est if you have this:
physlaptop <-> netvm <-> another netvm <-> appvm
To get physlaptop to talk to
appvm
, not only doesanother netvm
need to proxy ARPappvm
,netvm
also needs to proxy ARPappvm
, add firewall rules to permit traffic towardsappvm
, and add routing table entries that point toappvm
to the right network interfaces.By design in Qubes OS,
netvm
does not have any visibility into wherenetvm
is attached. Nothing is preventing the code in thequbesnetworkserver
module (installed in dom0) from telling each NetVM proxy ARP these addresses in addition to your immediate attached VIFs, or telling those same NetVMs hey, you also need to add forwarding rules for the following IPs in addition to your immediate attached VIFs... but this sort of thing is actually quite tricky to get right.Ultimately, it all comes down to making the
qubesnetworkserver
qubesd plugin boss thequbesroutingmanager
on each NetVM around. So if dom0 wanted to tell the entire downstream topology to each and every NetVM that needed to know it, sure, that would work.Oh, and there's routing tables to manage too.
It's not easy.
@marmarek: guidance in doing so?
@Rudd-O what are the challenges here?
From https://github.com/Rudd-O/qubes-network-server/pull/1#issuecomment-613380822
A PoC by @Rudd-O for QubesOS 4.0.
In regard of QubesOS 3.2 version of this project and going forward:
@marmarek: Any collaboration in making this go forward for the 4.0 and 4.1 branches?