Open ramboman opened 6 days ago
4.2.3
Since I upgraded my VPN ProxyVM (sys-vpn) from fedora-39-xfce to fedora-40-xfce, its depending VMs cannot reach the DNS server anymore.
sys-vpn
fedora-39-xfce
fedora-40-xfce
dom0
VPN Connections
Configure VPN...
+
Import a saved VPN configuration...
Result:
$ sudo nft list chain ip qubes dnat-dns table ip qubes { chain dnat-dns { type nat hook prerouting priority dstnat; policy accept; ip daddr 10.139.1.1 udp dport 53 dnat to 10.139.1.1 ip daddr 10.139.1.1 tcp dport 53 dnat to 10.139.1.1 ip daddr 10.139.1.2 udp dport 53 dnat to 10.139.1.2 ip daddr 10.139.1.2 tcp dport 53 dnat to 10.139.1.2 } }
$ sudo nft list chain ip qubes dnat-dns table ip qubes { chain dnat-dns { type nat hook prerouting priority dstnat; policy accept; ip daddr 10.139.1.1 udp dport 53 dnat to 1.1.1.1 ip daddr 10.139.1.1 tcp dport 53 dnat to 1.1.1.1 ip daddr 10.139.1.2 udp dport 53 dnat to 8.8.8.8 ip daddr 10.139.1.2 tcp dport 53 dnat to 8.8.8.8 } }
sys-vpn reroute correctly the DNS request to the proper DNS server
test-vpn
$ ping www.google.com PING www.google.com (64.233.177.99) 56(84) bytes of data. 64 bytes from yx-in-f99.1e100.net (64.233.177.99): icmp_seq=2 ttl=55 time=36.1 ms 64 bytes from yx-in-f99.1e100.net (64.233.177.99): icmp_seq=3 ttl=55 time=35.4 ms 64 bytes from yx-in-f99.1e100.net (64.233.177.99): icmp_seq=4 ttl=55 time=35.9 ms ^C --- www.google.com ping statistics --- 4 packets transmitted, 3 received, 25% packet loss, time 3033ms rtt min/avg/max/mdev = 35.380/35.790/36.111/0.305 ms
test-vpn is able to reach the DNS server and Google.
sys-vpn does not reroute correctly the DNS request to the proper DNS server.
$ ping www.google.com <nothing>
test-vpn is unable to reach the DNS server and Google.
/etc/NetworkManager/dispatcher.d/qubes-nmhook
qubes-nmhook
/usr/lib/qubes/qubes-setup-dnat-to-ns
qubes-setup-dnat-to-ns
get_dns_resolved()
[1.1.1.1, 8.8.8.8, 10.139.1.1, 10.139.1.2, 1.1.1.1, 8.8.8.8]
[10.139.1.1, 10.139.1.2, 1.1.1.1, 8.8.8.8]
install_firewall_rules()
dns_resolved
nft
apparatus
Qubes OS release
4.2.3
Brief summary
Since I upgraded my VPN ProxyVM (
sys-vpn
) fromfedora-39-xfce
tofedora-40-xfce
, its depending VMs cannot reach the DNS server anymore.Steps to reproduce
dom0
: Installfedora-40-xfce
VMdom0
: Updatefedora-40-xfce
VMdom0
: Create the ProxyVM:dom0
: Create the ProxyVM dependent VM:dom0
: Startsys-vpn
VMsys-vpn
: Setup VPN according to NetworkManager documentation:VPN Connections
->Configure VPN...
+
buttonImport a saved VPN configuration...
sys-vpn
: Check nftResult:
sys-vpn
: Start VPNsys-vpn
: Check nftExpected behavior
Result:
sys-vpn
reroute correctly the DNS request to the proper DNS serverdom0
: Starttest-vpn
VMtest-vpn
: ping www.google.com + ctrl+cResult:
test-vpn
is able to reach the DNS server and Google.Actual behavior
Result:
sys-vpn
does not reroute correctly the DNS request to the proper DNS server.dom0
: Starttest-vpn
VMtest-vpn
: ping www.google.com + ctrl+cResult:
test-vpn
is unable to reach the DNS server and Google.Further details
/etc/NetworkManager/dispatcher.d/qubes-nmhook
) to reroute the DNS when the right DNS server.qubes-nmhook
relies on/usr/lib/qubes/qubes-setup-dnat-to-ns
to reroute the DNS.qubes-setup-dnat-to-ns
,get_dns_resolved()
, in my case:fedora-39-xfce
, returns:[1.1.1.1, 8.8.8.8, 10.139.1.1, 10.139.1.2, 1.1.1.1, 8.8.8.8]
fedora-40-xfce
, returns:[10.139.1.1, 10.139.1.2, 1.1.1.1, 8.8.8.8]
qubes-setup-dnat-to-ns
,install_firewall_rules()
uses the first 2 elements of thedns_resolved
list to generate thenft
rules.apparatus
seems to have found a solution.