The issue
Changing the DNS option in resolv.conf from the VM's gateway to 8.8.8.8 will result in no DNS resolution.
resolvectl query google.com succeeds if I set DNS to my gateway.
The set-up
/etc/resolv.confis linked tostub-resolv.confsystemd-networkd is configured as follows:
[Match] Name=enp0s3 [Network] Address=192.168.0.222/24 Gateway=192.168.0.1 DNS=8.8.8.8/etc/systemd/resolv.confhas not been modified
Additional troubleshooting
- I tried linking
/etc/resolv.confto/run/systemd/resolve/resolv.confinstead and only listing 8.8.8.8 as nameserver there. But systemd-resolved overwrites/run/systemd/resolve/resolv.conf
