DNS lookup utilities - shawfdong/hyades GitHub Wiki
Here are some common nslookup commands and their dig counterparts.
Task | nslookup | dig |
---|---|---|
Forward lookup | nslookup google.de |
dig google.de dig +short google.de |
Reverse Lookup | nslookup [IP] |
dig -x [IP] dig +short -x [IP] |
Use a specific DNS server | nslookup google.de [DNS] |
dig @ [DNS] google.de dig @ [DNS] +short google.de |
Check MX records | nslookup -query=mx google.de |
dig google.de MX dig +short google.de MX |
User-defined timeout | nslookup -timeout=42 google.de |
dig google.de +time=42 dig +short +time=42 google.de |
The option +short is quite useful if you just want to get one IP address or a host name. By default, dig numerous additional information such as the IP of the DNS server used and the response time of: