How-to use a custom qube proxy update

Original forum link
https://forum.qubes-os.org/t/21220
Original poster
Solène R
Created at
2023-10-02 14:44:28
Last wiki edit
2024-01-15 10:14:17
Revisions
4 revisions
Posts count
17
Likes count
14

Introduction

This guide will explain how to change the update proxy qube that is used when updating templates, this may be useful if you want to download your updates through a VPN or a qube with some caching.

Explanations

The default update proxy is defined in /etc/qubes/policy.d/90-default.policy in dom0, it defaults to sys-whonix for qubes tagged whonix (which are tor qubes), otherwise it's sys-net for all other templates.

Setup in Qubes OS .42 with the GUI

It's became easy to change the update proxy settings thanks to the new GUI. You can choose the default update proxy and also add exceptions, and you make sure you won't break anything 👍

Capture d’écran_2024-01-15_11-12-19|632x500

Setup using command line

In this example, we will use a qube named sys-vpn as a proxy for the templates VMs:

Dom0

In dom0, edit the file /etc/qubes/policy.d/30-user.policy (it shouldn't exist by default), it will override the default settings, add the following content to the file. Note that the Whonix lines are required if you plan to use whonix (qubes with tor).

# Upgrade Whonix TemplateVMs through sys-whonix.
qubes.UpdatesProxy      *   @tag:whonix-updatevm    @default    allow target=sys-whonix
# Deny Whonix TemplateVMs using UpdatesProxy of any other VM.
qubes.UpdatesProxy      *   @tag:whonix-updatevm    @anyvm      deny

# Your custom UpdateProxy
qubes.UpdatesProxy      *   @type:TemplateVM        @default    allow target=sys-vpn

sys-vpn qube

In the settings of sys-vpn qube, go to the Services tab, in the drop down list select qubes-updates-proxy and then click on the [+ Add] button.

Restart the qube, done!