dro212
October 13, 2023, 9:25pm
1
I opened this issue on github:
opened 01:54PM - 19 Sep 23 UTC
T: bug
P: default
needs diagnosis
C: networking
affects-4.1
affects-4.2
### Qubes OS release
V4.2 rc3
### Brief summary
Using Debian Disposable templ… ates, the virtual DNS in all qubes doesn't work once the sys-net & sys-firewall are manually restarted.
Once an update occurs in the template and the new qubes update restart process takes place, the error is fixed and it works normally.
### Steps to reproduce
In sys-net & sys-firewall with a disposable Debian template, shut down both qubes and restart. The DNS request will fail in the sys-firewall.
### Expected behavior
DNS requests work as expected with a manual sys-net & sys-firewall restart.
### Actual behavior
DNS requests fail with, "site's DNS address cannot be found."
Does anyone have any advice for this issue? Maybe a simple work, or some command in sys-net to turn the virtual DNS daemon on after start?
I keep running into this issue and need to restart multiple times before the virtual DNS syncs to sys-firewall.
Can you post the output of these commands in sys-net and sys-firewall when this issue happens?
qubesdb-read /qubes-primary-dns /qubes-secondary-dns /qubes-netvm-primary-dns /qubes-netvm-secondary-dns
cat /etc/resolv.conf
cat /var/run/qubes/qubes-ns
sudo nft list ruleset
dro212
October 18, 2023, 1:13pm
3
The qubes DNS IPs, resolve.conf, and qubes-ns all have the correct primary and secondary nameserver to be 10.139.1.1 and 10.139.1.2 respectively.
I’ll post the nft ruleset shortly.
The problem isnt that it never works, but that it works sporadically, with the differentiator being the timing of sys-firewall startup with the sys-net network manager
Plum
October 20, 2023, 7:02pm
4
I’m also getting this. Pinging cnn.com from sys-firewall hangs. Pinging 8.8.8.8 works as expected. Pinging cnn.com works from sys-net.
4.2.0-rc4
Can you post the output of these commands in sys-net and sys-firewall?
qubesdb-read /qubes-primary-dns /qubes-secondary-dns /qubes-netvm-primary-dns /qubes-netvm-secondary-dns
cat /etc/resolv.conf
cat /var/run/qubes/qubes-ns
sudo nft list ruleset
Specifically nft rules are of interest.
dro212
October 21, 2023, 12:38am
6
nft ruleset:
table ip qubes {
set downstream {
type ipv4_addr
elements = { 10.138.37.115 }
}
set allowed {
type ifname . ipv4_addr
elements = { "vif36.0" . 10.138.37.115 }
}
chain prerouting {
type filter hook prerouting priority raw; policy accept;
iifgroup 2 goto antispoof
ip saddr @downstream counter packets 0 bytes 0 drop
}
chain antispoof {
iifname . ip saddr @allowed accept
counter packets 0 bytes 0 drop
}
chain postrouting {
type nat hook postrouting priority srcnat; policy accept;
oifgroup 2 accept
oif "lo" accept
masquerade
}
chain input {
type filter hook input priority filter; policy drop;
jump custom-input
ct state invalid counter packets 0 bytes 0 drop
iifgroup 2 udp dport 68 counter packets 0 bytes 0 drop
ct state established,related accept
iifgroup 2 meta l4proto icmp accept
iif "lo" accept
iifgroup 2 counter packets 0 bytes 0 reject with icmp host-prohibited
counter packets 0 bytes 0
}
chain forward {
type filter hook forward priority filter; policy accept;
jump custom-forward
ct state invalid counter packets 0 bytes 0 drop
ct state established,related accept
oifgroup 2 counter packets 0 bytes 0 drop
}
chain custom-input {
}
chain custom-forward {
}
chain dnat-dns {
type nat hook prerouting priority dstnat; policy accept;
ip daddr 10.139.1.1 udp dport 53 chat dnat to 192.169.1.1
ip daddr 10.139.1.1 tcp dport 53 chat dnat to 192.169.1.1
}
}
table ip6 qubes {
set downstream {
type ipv6_addr
}
set allowed {
type ifname . ipv6_addr
}
chain antispoof {
iifname . ip6 saddr @allowed accept
counter packets 0 bytes 0 drop
}
chain prerouting {
type filter hook prerouting priority raw; policy accept;
iifgroup 2 goto antispoof
ip6 saddr @downstream counter packets 0 bytes 0 drop
}
chain postrouting {
type nat hook postrouting priority srcnat; policy accept;
oifgroup 2 accept
oif "lo" accept
masquerade
}
chain _icmpv6 {
meta l4proto != ipv6-icmp counter packets 0 bytes 0 reject with icmpv6 admin-prohibited
icmpv6 type { nd-router-advert, nd-redirect } counter packets 0 bytes 0 drop
accept
}
chain input {
type filter hook input priority filter; policy drop;
jump custom-input
ct state invalid counter packets 0 bytes 0 drop
ct state established,related accept
iifgroup 2 goto _icmpv6
iif "lo" accept
ip6 saddr fe80::/64 ip6 daddr fe80::/64 udp dport 546 accept
meta l4proto ipv6-icmp accept
counter packets 0 bytes 0
}
chain forward {
type filter hook forward priority filter; policy accept;
ct state invalid counter packets 0 bytes 0 drop
ct state established,related accept
oifgroup 2 counter packets 0 bytes 0 drop
}
chain custom-input {
}
chain custom-forward {
}
}
dro212
October 21, 2023, 12:48am
7
I don’t have copy-from-minimal-template installed. This should be the standard nft ruleset. Nothing was changed by me.
To reiterate, I believe this to be a problem with the virtual DNS daemon in sys-net.
Is 192.169.1.1
your real DNS server IP? Shouldn’t it be 192.168.1.1
?
Do you have nameserver 192.169.1.1
in /etc/resolv.conf
as well?
There is no such thing as virtual DNS daemon, all of it is done by using firewall rules in dnat-dns
chain.
dro212
October 21, 2023, 8:22am
9
@apparatus I appreciate the help, but I don’t think you can reproduce the issue. This has nothing to do with firewall rules. Everything works ~ sometimes. It depends on the timing of the sys-firewall startup with the sys-net startup. Thanks for the help, though.
It maybe the network manager application.
Only DNS resolution is not working? Can you ping/curl IPs in sys-firewall when this issue happens?