-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On Wed, Feb 19, 2020 at 06:54:36AM -0800, aco31 wrote:
> hello,
>
> In my application (2 sys-net plugged on one firewall with 2 applications
> Vms), I must launch an ipsec tunnel, configure routes and iptables.
> This vpn must be mouted as soon as possible after each boot (juste after
> network.target for example).
> For security reasons I can't have any scripts on other VM's than the
> specific dom0. So this vpn must be launched from dom0.
Those two requirements ("as soon as possible" and "no scripts in the
vm") are contradicting each other. Outside of the VM you don't really
see what boot stage it is, so you can't really execute things at
arbitrary boot stage. Also, dom0's ability to execute anything in the VM
is launched pretty late in the boot process, so it may not be possible
at all to do things early from dom0.
If what you really want is to avoid ability for a compromised sys-net to
persist using some startup scripts in /rw, then the solution is
different: use DispVM for sys-net[1]. This way no configuration change
will persist, regardless if that's a script in /rw or change in your IPsec
configuration rendering it useless (which BTW wouldn't be prevented by
"no scripts in a vm" approach) or any other thing.
[1]
https://www.qubes-os.org/doc/disposablevm-customization/#using-static-disposablevms-for-sys-
This way, you have one VM that can be started to modify the
configuration (including startup scripts to start the VPN) and another
that is actual sys-net to run this configuration, but can't really
modify it persistently.
And with this approach, you can use standard scripts, like described
here:
https://www.qubes-os.org/doc/vpn/
- --
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCAAdFiEEhrpukzGPukRmQqkK24/THMrX1ywFAl5Nb8EACgkQ24/THMrX
1yymWwf/f5VtvaKThXKpKBadGETQ7Ck0xV+hmkbmKZBgrppWGKjYO1MElptzp1oW
UZ6QPqsLZrkF8M76Gd5EDPg6e+LbjCoZNAG5f6LpsE7g6ClHs3uZR4ypXfo+D1UC
qJUmuibHoqHhVNHRLEM4hJZ3dBOYmi2rGY/zW9jh8f8tfQ7AgDA+46Lsa86dLy/E
iWEPQFeNdGg9ObwihoM4iQzoUguB31hnCTmMN7fm7qOHEs9luIeizwbhjvnG8Y8e
Unw+zVdNz8zPz0u0i1g5bS45M9SvBGIBG7EMVHAwglafxg4qSqE5ZZBL4cXvFdSy
h0jeo+5afCxctpJnxCwoGzmMFbMa7g==
=9BR7
-----END PGP SIGNATURE-----