Qubes OS release
4.1
Brief summary
I searched the issues and I believe this one to be distinct than other possibly related (ie. #1183, #5706, #6927).
With the following setup:
AppVM --> VPN VM --> Firewall VM --> NetVM
and with the "AppVM" firewall set to limit outgoing connections to set of hosts(via GUI), the firewall in VPN VM applies DNS rules with
incorrect DNS servers set, thus cutting off the actual networking in AppVM.
For the AppVM with ip (10.137.0.27), that should be able to connect only to "X.X.X.X", the rules looks like:
sudo nft list table qubes-firewall
chain qbs-10-137-0-27 {
ip daddr X.X.X.X tcp dport 443 accept
ip daddr 127.0.0.53 tcp dport 53 accept
ip daddr 127.0.0.53 udp dport 53 accept
ip protocol icmp accept
reject with icmp admin-prohibited
reject with icmp admin-prohibited
}
and the sudo iptables -t nat -nvL shows:
Chain PR-QBS (1 references)
pkts bytes target prot opt in out source destination
770 54160 DNAT udp -- * * 0.0.0.0/0 10.139.1.1 udp dpt:53 to:1.1.1.1
0 0 DNAT tcp -- * * 0.0.0.0/0 10.139.1.1 tcp dpt:53 to:1.1.1.1
64 4304 DNAT udp -- * * 0.0.0.0/0 10.139.1.2 udp dpt:53 to:8.8.8.8
0 0 DNAT tcp -- * * 0.0.0.0/0 10.139.1.2 tcp dpt:53 to:8.8.8.8
It is my understanding that the script /etc/dhclient.d/qubes-setup-dnat-to-ns.sh works correctly, but the
qubes-firewall uses the incorrect values to setup nft rules, not respecting that the systemd-resolved is active
using the value from /etc/resolv.conf instead.
This used to work fine in 4.0 as far as I can tell, as the VMs in question were migrated directly from a working installation of 4.0.
The problem affects migrated as well as newly created AppVMs.
Steps to reproduce
- Create AppVM and configure it's firewall to "Limit outgoing connections" with a one or more hosts.
- Configure AppVM to use VPN-VM, which uses custom DNS(vpn-provided).
- Try connecting from AppVM to the allowed host(using domain name).
Expected behavior
AppVM connects succesfully to the allowed host.
Actual behavior
It is not possible to resolve the domain name.
Qubes OS release
4.1
Brief summary
I searched the issues and I believe this one to be distinct than other possibly related (ie. #1183, #5706, #6927).
With the following setup:
AppVM --> VPN VM --> Firewall VM --> NetVM
and with the "AppVM" firewall set to limit outgoing connections to set of hosts(via GUI), the firewall in VPN VM applies DNS rules with
incorrect DNS servers set, thus cutting off the actual networking in AppVM.
For the AppVM with ip (10.137.0.27), that should be able to connect only to "X.X.X.X", the rules looks like:
sudo nft list table qubes-firewalland the
sudo iptables -t nat -nvLshows:It is my understanding that the script
/etc/dhclient.d/qubes-setup-dnat-to-ns.shworks correctly, but thequbes-firewalluses the incorrect values to setupnftrules, not respecting that thesystemd-resolvedis activeusing the value from
/etc/resolv.confinstead.This used to work fine in 4.0 as far as I can tell, as the VMs in question were migrated directly from a working installation of 4.0.
The problem affects migrated as well as newly created AppVMs.
Steps to reproduce
Expected behavior
AppVM connects succesfully to the allowed host.
Actual behavior
It is not possible to resolve the domain name.