nslookup

Purpose: nslookup is used to retrieve various DNS records, IP addresses, and domain-related details for troubleshooting and analysis.

Key Features:

  • Retrieve DNS Records

  • Obtain IP Addresses

  • Query Specific DNS Servers

  • Resolve Hostnames to IP Addresses

  • Troubleshoot DNS Issues

Examples:

  1. Basic DNS Query:

    nslookup example.com

    Performs a basic DNS query for the domain "example.com," displaying information such as the authoritative DNS server and its IP address.

  2. Reverse DNS Lookup:

    nslookup 8.8.8.8

    Conducts a reverse DNS lookup for the IP address 8.8.8.8, providing the corresponding hostname.

  3. Query Specific DNS Server:

    nslookup example.com dns.server.ip

    Directs the query to a specific DNS server (replace dns.server.ip with the actual IP address of the DNS server).

  4. Resolve IP Addresses to Hostnames:

    nslookup 192.168.1.1

    Resolves the IP address 192.168.1.1 to its corresponding hostname.

  5. MX Record Query for Email Servers:

    nslookup -q=mx example.com

    Retrieves the Mail Exchange (MX) records for the domain "example.com," which indicate email server information.

nslookup is a versatile tool for DNS queries and troubleshooting, commonly used in network diagnostics.

Resources:

Last updated