Custom DNS for AppVM

If you want to use a different DNS server for your qubes, the best way is to change the /etc/resolv.conf file. You can do this by adding commands to /rw/config/rc.local:

# Debian
echo "nameserver 1.1.1.1"  | tee /etc/resolv.conf

# Fedora
echo "nameserver 1.1.1.1"  | tee /etc/resolv.conf
systemctl restart systemd-resolved

If instead you want them all to use the same DNS server, you can flush the dnat-dns nftables chain and nat the DNS requests to whatever you want:

# In vpn qube
nft flush chain qubes dnat-dns
nft add rule ip qubes dnat-dns meta l4proto { tcp, udp } iifgroup 2 ip daddr {10.139.1.1, 10.139.1.2} th dport 53 dnat to 1.1.1.1
1 Like