Hi,
i’m trying to let my email-vm just connect to the mail server, by blocking the rest of the outgoing traffic. The problem is, that the email-vm goes through sys-whonix. So if i make some fw rules on the email-vm it does not effect the connection. I think, because the sys-whonix.
Yes, and it’s worth understanding why. Remember that Tor works by wrapping your traffic in layers of encryption such that each node in your Tor circuit can decrypt only its own layer. Normally, sys-firewall enforces firewall rules. However, in this case, sys-firewall cannot read your traffic in order to enforce firewall rules, because the traffic has already been encrypted by sys-whonix before it reaches sys-firewall. This is why unman’s solution works: Because you’re adding a firewall VM beforesys-whonix, before the traffic gets encrypted.
Except that in every other case, rules are enforced on a qube’s netvm,
whereas sys-whonix just ignores them.
And if you insert a firewallVM to enforce the rules then all traffic
arriving at sys-whonix will appear to come from the same IP address - I
have no idea what effect this will have on Tor circuits.
by the way, is it possible that the 80 connection of thunderbird is for the DKIM check? Just opened them, but no efect… can not connect to the DKIM check. But wireshark shows nothing blocked, but the 80 ports. hmmm… is it also something about tor?
It may be too specific, but it does have the benefit of being right.
If you have THIS:
sys-net - sys-firewall - firewall2 - qube
Then the rules for “qube” are enforced on firewall2, its netvm.
Firewall rules are processed on the immediate netvm.
In this case, sys-firewall doesn’t see any traffic from qube. It only
sees traffic that appears to come from firewall2.
sys-whonix breaks this model, because it doesn’t process firewall rules
at all.
So in this case:
sys-net - sys-firewall - sys-whonix - qube
NO firewall rules are implemented. (They are not written on
sys-firewall but cant be processed because traffic is encrypted - they
are not written at all.)
If you insert a new firewall:
sys-net - sys-firewall - sys-whonix - firewall2 - qube
Then you do get benefit of a firewall, but sys-whonix only sees
traffic that seems to originate from firewall2, which may do strange
(and unwanted) things to Tor circuits.
Here’s an example:
You have 2 qubes, and you ssh into one server.
If you have both connected to sys-whonix then stream isolation
will ensure you use different circuits, (Isolate Client Address is on
by default).
If you attach both to a firewall, then at sys-whonix the ssh traffic
appears to come from the IP of the firewall, so will not trigger stream
isolation, and both streams will use the same circuit. At the server
both logins will appear to come from the same IP address. This may not
be what you want.
This is just an example - I don’t know what steps Whonix takes to
mitigate this, (if any), and I find the documentation unclear, but it is a
potential issue.
Is this also the case with VPN qubes? Do they always enforce firewall rules correctly?
Is sys-whonix ignoring them part a design choice (i.e., intended to keep firewall rule enforcement and Torification compartmentalized in separate VMs), or do you think it’s an oversight or bug?