Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPv6 server queried when using -4 #130

Open
wsw70 opened this issue Jul 2, 2024 · 3 comments
Open

IPv6 server queried when using -4 #130

wsw70 opened this issue Jul 2, 2024 · 3 comments
Labels

Comments

@wsw70
Copy link

wsw70 commented Jul 2, 2024

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 (?)

@mr-karan
Copy link
Owner

mr-karan commented Jul 2, 2024

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	

@daenney
Copy link

daenney commented Jul 2, 2024

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.

@wsw70
Copy link
Author

wsw70 commented Jul 2, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants