Cyberlium
Cyberlium
Cyberlium on Android·Google Play Store

Learn cybersecurity with hands-on labs and AI mentor support on your phone.

Mod 5 · Les 2/5
In progress
Module 5•Lesson 2 of 5•⏱️ 15 min read•Beginner+39 XP

dig nslookup and DNS Records YOU Own

NS/A/MX/TXT on example.com or YOUR domain

dig nslookup and DNS Records YOU Own
00:00/03:58

Visual · dig_dns_owned

dig example.com NS +short. Resolve-DnsName on Windows.

DNS is the phone book of names you publish. Read your rows before someone else quotes them.

dig, host, nslookup, and PowerShell Resolve-DnsName ask DNS for records. example.com is the safe public example (dig example.com NS +short). YOUR domain replaces example.com when you own it. That is how you confirm NS, A/AAAA, MX, and TXT (SPF/DKIM/DMARC ideas) match what you intended. Original Cyberlium. GATE 192.168.0.1. ViewDNS named for browser views of owned/example names. You will not dig a classmate’s startup, not nmap discovered IPs, not hydra mail hosts. Next: security.txt robots.txt and humans.txt.

1. NS and A: who answers the name, where it points

dig example.com NS +short lists nameservers for the documentation domain. dig example.com A +short shows an address the name currently maps to. On Windows, Resolve-DnsName example.com -Type NS. These commands are literacy. Pointing them at every brand you dislike is not this course.

For YOUR domain, the same commands are a config audit. ; 192.168.0.1 is not a public zone you should “dig” as WHOIS.

Command guide

NS and A: who answers the name, where it points

═══ INSTALL ═══

Linux (Debian/Ubuntu):

Command — copy this

sudo apt install dnsutils

macOS:

Command — copy this

brew install bind

Windows: Built-in: nslookup (or install BIND for dig) Use nslookup (built-in)

═══ LINUX / macOS ═══

Query DNS records

Command — copy this

dig example.com A +short
dig example.com NS +short
dig example.com MX +short
dig example.com TXT +short
dig example.com ANY +noall +answer

Alternative tools

Command — copy this

host example.com
nslookup example.com
nslookup -type=MX example.com

═══ WINDOWS ═══

Command — copy this

nslookup example.com
nslookup -type=MX example.com
nslookup -type=NS example.com
nslookup -type=TXT example.com

Optional command

PowerShell

Command — copy this

Resolve-DnsName example.com
Resolve-DnsName example.com -Type MX
Resolve-DnsName example.com -Type NS

2. MX and TXT: mail and policy rows you published

MX you met in Module 4. TXT often holds SPF and other policy. Read YOUR domain’s TXT. Do not “collect SPF” from random banks. If you have no domain, example.com TXT is enough literacy.

Unexpected TXT on a name you own can be a leftover vendor or a takeover smell — fix via YOUR DNS host, do not nmap the old vendor.

3. Write the map; do not scan the addresses

Copy NS/A/MX/TXT into your note. An A record is not an invitation to nmap that IP. Cyberlium stops at the record.

Next: well-known text files on a site you own, plus example.com security.txt as literacy, plus a local security.txt in cyberlium-lab.

4. What you ship: NS/A/MX/TXT for example.com and/or YOUR domain, no nmap of A records

dig/host/nslookup/Resolve-DnsName as available. ViewDNS named for owned/example. DEMO GATE. Notes 600.

5. What you record before the next lesson

Date. example.com NS/A. DOMAIN rows or skip. NEVER nmap A. File t12-m05-l02-dig-dns.txt chmod 600.

6. Wrong vs right: strangers vs identifiers YOU own

Worked failure — same OSINT word, opposite target. Right never needs a classmate or a dump site.

  • Wrong: nmap every A record. dig a classmate startup then hydra SSH. Scan 192.168.0.0/24 “for local DNS.”
  • Right: Read records. Stop. Next: security.txt robots.txt and humans.txt.
Hands-on Exercise

Mission: print DNS rows you are allowed to ask

1) / STOP if router. 2) dig example.com NS +short and A/MX/TXT. 3) Repeat for YOUR domain or skip. Never nmap the addresses. Never classmate zones.

Pro Tip

Stuck? Ask Cyberlium AI Mentor

Ask Mentor how NS differs from A — not how to axfr a stranger’s zone.

Practice QuizQuestion 1
Multiple choice
Q1

APPLY: In-scope command from this lesson?

Practice QuizQuestion 2
True or False
Q2

APPLY: True or False: An A record is permission to nmap that IP.

Practice QuizQuestion 3
Multiple choice
Q3

APPLY: Windows equivalent named here?

←Previous: WHOIS and RDAP Literacy
Answer 3 practice quiz questions to unlock XP reward. (0/3 answered)
Skip quiz & read next →