At the moment I am trying to find a way to get all DNS records from domain.com for example so that I can process them further in a script.
I've tried everything with dig, host and nsllookup commands, but I never get the result I want.
The result I would like is similar to https://dnsdumpster.com/
Is it possible to get all DNS records from a domain on the command line in linux ?
CodePudding user response:
At the moment I am trying to find a way to get all DNS records from domain.com for example so that I can process them further in a script.
You can't. There is no way to retrieve "all" records. No matter what tool you are using.
There are heuristics, but otherwise getting all records mean doing a zone transfer, something that is almost not allowed anywhere.
Or you can loop on arbitrary names and record types, but you will that way never find like DKIM records that are on random names.
Don't be fouled by all resources telling you to do an "ANY" query. This doesn't retrive all records but only records in the recursive nameserver cache you are using and authoritative nameservers refuse to reply to this. Also ANY
does not mean ALL
at all.