nslookup
Loads the value specified as the domain field, queries the DNS to resolve names, and outputs the result.
Syntax
nslookup ns=IP_ADDR [OPTIONS] DOMAIN_FIELD output FIELD, ...
Required Parameter
ns=IP_ADDR
- IPv4 or IPv6 address of the DNS server.
DOMAIN_FIELD
- Field with domain name.
output FIELD, ...
- Fields to retrieve from the DNS response, separated by a comma (
,
). Specify one or more of the following:ip
: IPv4 or IPv6 addressstatus
: Transaction message status. If there is an error, an error message is displayed.flags
: Control flags in request/response message- AA: Authoritative answer
- TC: Truncated
- RD: Recursion desired
- RA: Recursion available
answers
: Response result of DNS serverauthorities
: Information of authoritative DNS serversadditionals
: Other additional information
Optional Parameter
cache=INT
- Cache size of DNS response in bytes (default: 1,048,576. approx. 1 MB)
timeout=INT
- DNS response timeout in seconds (default:
5
). type=TYPE
- The type of DNS record to query the DNS server (default:
A
). Specify one of the following:A
: IPv4 address record, mapping hostnames to an IP address of the host.AAAA
: IPv6 address record, mapping hostnames to an IP address of the host.CNAME
: Canonical name. An alias from one domain name to another domain name.MX
: Mail exchange record. The mail server responsible for accepting email messages on behalf of a domain name.NS
: Name server record, delegating a DNS zone to use the given authoritative name servers.PTR
: PTR resource record, a pointer to canonical name. Commonly used for reverse DNS lookups.TXT
: Text record, arbitrary human-readable or machine-readable text.
Usage
Perform DNS lookup for domain by asking name server 1.1.1.1.
table spamhouse
| nslookup timeout=5 ns="1.1.1.1" domain
output ip, status, flags, answers, authorities, additionals