-
-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove tinyproxy from Whonix-Gateway (sys-whonix
) and make Whonix Templates networked by default with Net qube set to sys-whonix
#7737
Comments
https://www.qubes-os.org/doc/how-to-install-software/#updates-proxy
I would like to add that the most justifiable argument about running browser in the template does not apply to Whonix
|
I have a bunch of StandaloneVM with no netvm that I update using the whonix-updatevm tag. If sys-whonix remove tinyproxy what are my options to update those? Will cacher-whonix do the work or do I have to switch the netvm to sys-whonix (making them network accessible again without firewall rules)? |
The updates proxy has one additional advantage not listed above: it isolates template's TCP/IP stack. With updates proxy instead of normal networking, even compromised sys-whonix cannot send crafted IP packets to any template. It can only interact with package manager that uses updates proxy explicitly, and only at HTTP proxy protocol level (which in most cases will be just CONNECT request + TLS session anyway). As for @Minimalist73 comment - that's a valid question. Dropping tinyproxy (being target of |
For clarity, my motivations into creating tlaurion/shaker#1 (totally imperfect as of now, needs guidance) were:
The idea behind this is that debian-12 and whonix are targeting some of the same updates packages (same debian repositories) as of today, and ideally they should all be downloaded once and the cached packages used per templates when requesting their updates. Therefore:
I am not convinced that removing whonix update proxy is a good idea, most of the Qubes users I'm aware of are actually ticking sys-whonix to be used as the update proxy when deploying whonix at qubes installation. I am not currently confortable pushing users to have templates accessing directly the internet is a good idea either, and questioned that recommendation in the past, which made its way in official documentation, but with proper warnings. To me the ideal would be:
Those are suggestions. I was able to bypass whonix templates limitation without modifying the templates directly (respecting whonix for update proxy check) but having unman's cacher modified so that apt-cacher-ng fakes its tor compliance by crafting a userinfo.html file so that whonix update proxy checks are happy seeing a tor enabled cache proxy even if it could be a lie. This was refused by both @adrelanos and @unman as a proper implementation, which I agree is not ideal. Whonix templates would think that cacher is tor enforcing in all cases, even it cacher was not using sys-whonix to torrify the updates; that is a dirty hack and not ideal. Therefore the only foreseen good implementation woukd be to have sys-whonix implement cacher, modified to fit whonix. Therefore: a cacher-whonix salt shaker recipe. This is a search for a better implementation, not a request to drop what is already working for most users using sys-whonix as an update proxy, guaranteeing torrified updates. Let's be clear here, tlaurion/shaker#1 is absolutely not ready for produxtion, but shows how that could work as salt recipes to enforce apt-cacher-ng under sys-whonix (whonix-gw) as a tinyproxy replacement. In short:
Linked to:
|
Discussion of tlaurion/shaker#1 is being spread over a number of places.
For the record here, I think this proposal is not a good one.
If user has been using a clear cache and then decides to switch all
updates to Tor, then they lose all benefit of already cached packages.
Similarly for the reverse.
If they have a single cache, then changing to/from update over Tor would be
as simple as changing the netvm of the caching proxy.
I know users who have wanted to update *some* templates over Tor and
some not. They clone the caching proxy (thus retaining already cached
packages) and change the netvm. Afterwards the caches diverge.
The issue with Whonix checks is this - Whonix uses a check based on a
parameter that is set within Whonix. That makes sense.
It doesn't make sense to use that same parameter in a distinct caching
proxy *if the parameter is set by the user*. I have already indicated
that it is possible to automatically set a parameter based on an onion
check. with the downside that if the proxy is in clear, there is leakage
of DNS for an onion address. I think this is of little importance given
the fact that Tor/Whonix are easily fingerprinted in any case.
As to the current proposal, I appreciate the desire to avoid complexity,
but would not want to see some templates online by default.
|
Thank you for your replies! Lots of good arguments!
Which fingerprinting vector are you referring to? |
I guess @unman was talking about tor being "fingerprint-able" since using tor (observable by ISP) or poking a .onion DNS address shows the same "I'm trying to access a .onion over tor / i'm using tor" network observable behavior (fingerprinting) on the wire. This is an accepted risk of using tor, after all, on which I agree with @unman that:
I think I already explained the motivations of having apt-cacher-ng. Also why it would be "normal" to have it under sys-whonix if whonix is deployed. And even more if sys-whonix is the update proxy defined at install. I also expressed why I think removing tinyproxy in whonix-gw (sys-whonix) without replacing it by something better doesn't seem like a good idea. Forcing users to give whole internet access to Templates should be a no go but as last resort. Actually, I went in the opposite direction testing @unman's cacher, adding update proxy policy rule so that any vm is enforced in using apt-cacher-ng with templates modified repo URLs, which permits to download packages once (and test in dispvm or app qubes) prior of choosing to actually reuse cached packages to be installed in template if they fitted the bill (having users understand that installing packages in app qube is another "problem" that is already documented upstream and should not be mixed. It is not a bug, but a feature). What would still be needed on top of cacher is a wrapper of some sorts to change repo definitions URLs as soon as they are added (probably per cacher deployment) to be apt-cacher-ng compliant prior to the users trying to use those repo definitions not being transformed to be apt-cacher-ng compliant and failing. More thinking is needed to fix that. It could be a directory watching deamon (inotifywait), triggered when the repo directory files are modified and applying a sed to transform all current https URLs to use apt-cacher-ng as part of the cacher (or sys-whonix, or both). @unman, please check inotifywait. If that wrapper was deployed in templates per cacher, the whole problem of users adding repos after cacher deployment would be dealt with and become a non-issue, and would not require qubes updater to be modified either. I will follow the discussions here and wherever I'm tagged directly (@tlaurion on GitHub and @insurgo over Qubes forum), and if there is interest, will go back to tweaking/testing tlaurion/shaker#1 to implement what is decided to be best. I continue to believe that with the help of extrepo and extrepo-offline (backported if needed @marmarek), we would soon enough remove the most problematic issue of adding repo+keys and install user desired software in templates without the need of opening the templates to the whole internet, nor to follow non-understood bash code snippets to install additional software. With cacher, extrepo + extrepo-offilne and repo directory watchers (inotifywait script in templates per cacher enablement), users would be able to add needed software more easily without needing to open templates to the whole internet (UX work around that and GUI package installer is a parallel discussion). |
I think this too difficult and therefore maybe best not done. Other traffic through UpdatesProxy: tb-updater / flatpak. In any case, this seems unrelated to this ticket and should go into a dedicated ticket should you wish to further this feature request. Maybe there was even already a ticket for this in the past.
Seems also to belong into a different ticket. For the record only (and updated original ticket), non-networked Qubes-Whonix tempaltes is leading to a non-ideal stream isolation for Qubes UpdatesProxy. Details documented here: Despite this issue, it's probably best to keep Qubes-Whonix Templates non-networked except through the standard Qubes UpdatesProxy mechanism the same way this is implemented for all Qubes Templates. Therefore I am closing this ticket in favor of: |
I am suggesting to remove tinyproxy from Whonix-Gateway (
sys-whonix
) and make Whonix Templates networked by default with Net qube set tosys-whonix
.motivation for this change suggestion:
I don't like the extra complexity of having Qubes UpdatesProxy specific firewall rules in Whonix-Gateway firewall. (here)(Was fixed in sys-whonix should use tinyproxy using socks instead of transparent proxying #8398.)advantages of this change would be:
disadvantages if this change is implemented:
Why do I as maintainer of Qubes-Whonix make this ticket?
Other alternatives?
Getting tinyproxy out of sys-whonix somehow... But how would that be implemented? Maybe a third VM but the effort to maintain that would be too high on my side. Perhaps Qubes would like to maintain a standalone tinyproxy / UpdatesProxy / cacher VM? Created,
Create
sys-ops-whonix
VM for Enhanced Security and Isolation in Qubes-Whonix #9294for it.
The text was updated successfully, but these errors were encountered: