feat: add section on fixing mdns with resolved

This commit is contained in:
2025-08-11 15:36:46 +02:00
parent a05fcb8ade
commit ea8a8b2b89

View File

@@ -138,3 +138,20 @@ dev () {
esac
}
```
## Fix `systemd-resolved` for `.dev.local`
If `getent hosts yourdomain.dev.local` returns nothing while
`dig yourdomain.dev.local @172.157.5.249` works, `systemd-resolved` is routing `.local` to mDNS instead of DNS.
```bash
sudo mkdir -p /etc/systemd/resolved.conf.d
sudo tee /etc/systemd/resolved.conf.d/localcerts.conf >/dev/null <<EOF
[Resolve]
DNS=172.157.5.249
Domains=~dev.local
MulticastDNS=no
LLMNR=no
EOF
sudo systemctl restart systemd-resolved
```