You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: common-tasks/software-update-vm.md
+41-11
Original file line number
Diff line number
Diff line change
@@ -82,7 +82,8 @@ To enable or disable any of these repos permanently, uncomment the corresponding
82
82
Reverting changes to a TemplateVM (R4.0)
83
83
---------------------------------
84
84
85
-
TBD- Qubes 4.0 uses a CoW system that permits snapshotting. To revert changes, one would...
85
+
Qubes 4.0 uses a CoW system that permits snapshotting. Reversion functionality is still being developed at the
86
+
time of writing. See [issue #3256](https://github.com/QubesOS/qubes-issues/issues/3256) for details.
86
87
87
88
Reverting changes to a TemplateVM (R3.2)
88
89
---------------------------------
@@ -179,34 +180,63 @@ Temporarily allowing networking for software installation
179
180
180
181
Some third-party applications cannot be installed using the standard yum repositories, and need to be manually downloaded and installed. When the installation requires internet connection to access third-party repositories, it will naturally fail when run in a Template VM because the default firewall rules for templates only allow connections to standard yum repositories. So it is necessary to modify firewall rules to allow less restrictive internet access for the time of the installation, if one really wants to install those applications into a template. As soon as software installation is completed, firewall rules should be returned back to the default state. The user should decided by themselves whether such third-party applications should be equally trusted as the ones that come from the standard Fedora signed repositories and whether their installation will not compromise the default Template VM, and potentially consider installing them into a separate template or a standalone VM (in which case the problem of limited networking access doesn't apply by default), as described above.
181
182
182
-
Updates proxy (some content applies only to versions earlier than R3.2)
183
+
Updates proxy
183
184
-------------
184
185
185
-
Updates proxy is a service which filter http access to allow access to only something that looks like yum or apt repository. This is meant to mitigate user errors (like using browser in the template VM), rather than some real isolation. It is done with http proxy instead of simple firewall rules because it is hard to list all the repository mirrors (and keep that list up to date). The proxy is used only to filter the traffic, not to cache anything.
186
+
Updates proxy is a service which filters http access to allow access to only something that looks like yum or apt repository. This is meant to mitigate user errors (like using a browser in the template VM), rather than some real isolation. It is done with an http proxy (tinyproxy) instead of simple firewall rules because it is hard to list all the repository mirrors (and keep that list up to date). The proxy is used only to filter the traffic, not to cache anything.
186
187
187
-
The proxy is running in selected VMs (by default all the NetVMs (1)) and intercept traffic directed to 10.137.255.254:8082. Thanks to such configuration all the VMs can use the same proxy address, and if there is a proxy on network path, it will handle the traffic (of course when firewall rules allows that). If the VM is configured to have access to the updates proxy (2), the startup scripts will automatically configure dnf to really use the proxy (3). Also access to updates proxy is independent of any other firewall settings (VM will have access to updates proxy, even if policy is set to block all the traffic).
188
+
There are two services ([qvm-service](https://www.qubes-os.org/doc/dom0-tools/qvm-service/), [service framework](https://www.qubes-os.org/doc/qubes-service/)):
1. qubes-updates-proxy (and its deprecated name: qubes-yum-proxy) - a service providing a proxy for templates - by default enabled in NetVMs (especially: sys-net)
191
+
2. updates-proxy-setup (and its deprecated name: yum-proxy-setup) - use a proxy provided by another VM (instead of downloading updates directly), enabled by default in all templates
190
192
191
-
(2) Firewall tab -\> Allow connections to Updates Proxy; this setting works immediately (once OK is clicked)
193
+
This is generally the same in R3.2 and R4.0 - in both cases both the old and new names work. And in both cases defaults listed above are applied if the service is not explicitly listed in services tab.
192
194
193
-
(3) Services tab -\> "yum-proxy-setup" entry; this setting works at next VM startup
195
+
### Technical details (R4.0)
194
196
195
-
### Technical details
197
+
Instead of using a network connection like in R3.2, R4.0 uses RPC/qrexec. The proxy is configured in
198
+
qrexec policy: /etc/qubes-rpc/policy/qubes.UpdatesProxy. By default this is set to
199
+
sys-net and/or sys-whonix, depending on firstboot choices. This new design allows for templates to be
200
+
updated even when they are not connected to any netvm.
196
201
197
-
1. Updates proxy: It is running as "qubes-yum-proxy" service. Startup script of this service setup firewall rule to intercept proxy traffic:
202
+
Example policy file in R4.0 (with whonix installed, but not set as default updatevm for all templates):
203
+
```
204
+
# any VM with tag `whonix-updatevm` should use `sys-whonix`; this tag is added to `whonix-gw` and `whonix-ws` during installation and is preserved during template clone
1. VM using the proxy service Startup script (qubes-misc-post service) configure yum using /etc/yum.conf.d/qubes-proxy.conf file. It can either contain
232
+
2. VMs using the proxy service Startup script (updates-proxy-setup or qubes-misc-post service) configure
233
+
dnf using /etc/yum.conf.d/qubes-proxy.conf file. It can either contain a
204
234
205
235
~~~
206
236
proxy=http://10.137.255.254:8082/
207
237
~~~
208
238
209
-
line, or be empty. Note that this file is specifically included from main yum.conf, yum does not support real conf.d configuration style...
239
+
line, or be empty. Note that this file is specifically included from main yum.conf, dnf does not support real conf.d configuration style...
210
240
211
241
Note on treating AppVM's root filesystem non-persistence as a security feature
0 commit comments