tools

Overview

nslookup is a command-line tool for querying DNS records. Used to resolve domain names to IP addresses, look up specific record types, and troubleshoot DNS issues. Available on both Linux and Windows.


Target / Context

DNS servers and domain name resolution. Useful during recon to map domains, find mail servers, identify subdomains, and verify DNS configuration.


Installation

ℹ︎Installation Commands:

Pre-installed on most Linux and Windows systems

sudo apt install dnsutils

Basic Usage

ℹ︎Basic Usage:
nslookup www.example.com
man nslookup

Flags & Options

ℹ︎Flags & Options:
FlagDescriptionExample
type=AQuery A records (IPv4)nslookup -type=A example.com
type=AAAAQuery AAAA records (IPv6)nslookup -type=AAAA example.com
type=MXQuery mail exchange recordsnslookup -type=MX example.com
type=TXTQuery TXT recordsnslookup -type=TXT example.com
type=NSQuery nameserver recordsnslookup -type=NS example.com

Common Use Cases

Resolve a Domain

ℹ︎Commands:
nslookup www.example.com

Query Specific Record Types

ℹ︎Commands:
nslookup -type=MX example.com
nslookup -type=TXT example.com
nslookup -type=NS example.com


References / Images