Hi, I have a simple qube constellation to enforce LAN-only traffic:
myappvm --(netvm)--> sys-firewall-lan-only --(netvm)--> sys-net
Specifically I’d like to block DNS completely and instead handle domain names in /etc/hosts of myappvm manually. To do that, sys-firewall-lan-only has these qvm-firewall rules:
$ qvm-firewall sys-firewall-lan-only list
NO ACTION HOST PROTOCOL PORT(S) SPECIAL TARGET ICMP TYPE EXPIRE COMMENT
0 drop - - - dns - - -
1 accept 192.168.1.0/24 - - - - - -
2 drop - - - - - - -
(last probably not needed, but better safe than sorry)
From what I learned, myappvm uses its netvm as virtual gateway 10.139.1.1/2 to send DNS requests. And the last netvm in this chain forwards it to the “real” DNS resolver.
Expected:
- If
myappvmvisitsqubes-os.org, DNS request gets blocked. - If
myappvmvisitsserver.lan.domainand/etc/hostsmaps it to192.168.1.1, I am able to visit site.
But first assumption is not the case!
Some of you know, vanilla Firefox is quite chatty with default configuration. If I start Firefox in myappvm, it successfully creates DNS requests for facebook.com, reddit.com, a.ka the whole tracking shitshow (verified by LAN DNS monitoring tool).
More specifically, I cannot visit those sites, as the IP range is blocked. But the DNS request goes through, despite qvm-firewall rule 0 drop - - - dns.
Why is that? Seems like a bug of Qubes firewall from user perspective.
Thanks for any help
Update: If I directly set a blocking rule in myappvm:
qvm-firewall myappvm add --before=0 action=drop specialtarget=dns
, DNS gets successfully blocked. But I had hoped to create one single netvm that automatically enforces this rule.
So why does DNS not getting blocked, when the rule is created for the netvm?