IPv6 server queried when using -4
I was under the impression that doggo -4 mrkaran.dev would query A records and also use a IPv4 server.
PS C:\Users\a> doggo -4 mrkaran.dev
time="2024-07-02T12:00:43+02:00" level=error msg="error looking up DNS records" error="dial udp4: address ::1: no suitable address found"
NAME TYPE CLASS TTL ADDRESS NAMESERVER
mrkaran.dev. A IN 300s 172.67.187.239 10.24.130.10:53
mrkaran.dev. A IN 300s 104.21.7.168 10.24.130.10:53
mrkaran.dev. A IN 300s 172.67.187.239 10.24.131.10:53
mrkaran.dev. A IN 300s 104.21.7.168 10.24.131.10:53
What does the error message mean? It looks like doggo is expecting an IPv6 server (?)
doggo is expecting an IPv6 server
It's reading the nameserver specified in /etc/resolv.conf and that seems to be advertising on IPv6 going by the logs udp4: address ::1: no suitable address found.
So you'll either need to specify an IPv4 nameserver address or change your system default.
For eg, on my Adguard DNS server on IPv4 this works as expected:
doggo -4 mrkaran.dev
NAME TYPE CLASS TTL ADDRESS NAMESERVER
mrkaran.dev. A IN 42s 104.21.7.168 127.0.0.53:53
mrkaran.dev. A IN 42s 172.67.187.239 127.0.0.53:53
Would it be feasible for it to ignore v6 servers when -4 is passed? And do the same for v4 servers when -6 is passed?
A resolv.conf might have multiple nameserver lines (up to 3 typically), and they don't all have to be v4 or v6.
It's reading the nameserver specified in
/etc/resolv.conf
I should have mentioned that this is Windows 11. There are no IPv6 nameservers:
DNS Servers . . . . . . . . . . . : 10.24.130.10
10.24.131.10