-
Notifications
You must be signed in to change notification settings - Fork 94
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
feat: host collector for DNS #1617
Conversation
} | ||
defer file.Close() | ||
|
||
config, err := dns.ClientConfigFromFile(file.Name()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we have an option on the collector to specify ndots, and then if its set update the DNS config here to set that value?
https://github.com/miekg/dns/blob/master/clientconfig.go#L12-L19
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ndots is a good example, but anywhere someone might want to override the config from the collector could be useful to expose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking further, since you're iterating and appending every search domain found on the host to see if one of them resolves something we suspect it shouldn't, then the ndots stuff probably isn't needed? So whether you decide to add that or not completely up to you at this stage.
Description, Motivation and Context
New host collector DNS that will run DNS query to various domains. Will help with DNS issue such as detect wildcard DNS used.
Fixes: https://app.shortcut.com/replicated/story/112277/analyse-search-domains-with-wildcard-dns-records-on-hosts
Demo: https://asciinema.org/a/Ma1i4T0xp50ODNswrfeHTrOTo
Sample spec
Sample output when there's wildcard DNS configured
Checklist
Does this PR introduce a breaking change?