Chapter 9: Domain Names, DNS and Subdomains
9.12 Troubleshooting domains
Friends, this table is a checklist for domain problems. Find the symptom, read the cause, and apply the fix – no guessing.
मित्रांनो, डोमेन प्रॉब्लेम्ससाठी हा टेबल एक चेकलिस्ट आहे. सिम्प्टम शोधा, कारण वाचा, आणि फिक्स करा – अंदाज नको.
दोस्तों, डोमेन प्रॉब्लम्स के लिए ये टेबल एक चेकलिस्ट है. सिम्प्टम ढूँढो, कारण पढ़ो, और फ़िक्स करो – अंदाज़ा नहीं.
| Symptom | Likely cause | Fix |
|---|---|---|
dig returns nothing / NXDOMAIN |
Record missing, typo in name, domain not verified or expired | Check the DNS page; verify registrant email; check expiry |
dig shows old/parking IP |
Old A record still present, TTL not expired, or forwarding on | Delete the parked A record; turn off forwarding; wait for TTL; dig @8.8.8.8 |
| Records correct in GoDaddy but not used | Name servers point elsewhere (e.g. Route 53) | dig NS example.com +short; edit records where NS points |
| Domain resolves, browser times out | Security group / firewalld; wrong Elastic IP | curl -I http://EIP; open 80/443 |
| Domain shows default welcome page | server_name/ServerName doesn't include this name; default site wins |
Add the name; remove Ubuntu default; nginx -T, apachectl -S |
www works but apex doesn't (or reverse) |
Only one of the records exists, or only one name is in server_name |
Add A @ and CNAME www; list both names in config |
| Works on mobile data, not on laptop | Local DNS cache | Flush cache (section 9.9) |
| certbot: Timeout during connect / NXDOMAIN | DNS not yet pointing here, or port 80 closed | Fix DNS first; open 80; retry |
| Email stopped after moving DNS | MX/TXT records not recreated | Copy MX/TXT to the new DNS host |
Ravindra Bagale's Tip
When a domain problem comes up, I always use this order: dig NS (where are the records?), dig +short (is the IP right?), curl -I http://EIP (does the server answer?), and finally server_name. Almost every domain problem is found in these four steps.
Ravindra Bagale's Tip – मराठी
Domain problem आला की मी नेहमी हाच क्रम वापरतो: dig NS (records कुठे आहेत?), dig +short (IP बरोबर आहे का?), curl -I http://EIP (server उत्तर देतो का?), आणि शेवटी server_name. या चार steps मध्ये जवळजवळ प्रत्येक domain problem सापडतो.
Ravindra Bagale's Tip – हिंदी
Domain problem आए तो मैं हमेशा यही क्रम इस्तेमाल करता हूँ: dig NS (records कहाँ हैं?), dig +short (IP सही है?), curl -I http://EIP (server जवाब देता है?), और आखिर में server_name. इन चार steps में लगभग हर domain problem पकड़ में आ जाता है.
Lab
Chala, server_name madhun www.example.com muddam kadha aani reload kara. curl -I http://www.example.com kaay dakhavto te liha, mag table madhun karan olkha, naav parat taka aani reload kara.
Extended teaching notes
Why this lesson matters
Cloud security is mostly IAM, network exposure, logging and secure defaults. The shared responsibility model means the provider patches the metal; you patch what you configure.
- No public databases or public admin panels.
- Roles / OIDC instead of long-lived access keys.
- CloudTrail / Activity Logs / Audit Logs on and retained.
- S3/Blob/GCS: Block Public Access; encrypt; least privilege.
Mini case study
Suppose we are on a purple-team exercise for an Indian mid-size company (sample data). Red notes a technique from this lesson against a lab clone. Blue must show the control that stops it, the log that would have fired, and the ticket that hardens production. That is the standard this course trains you for.
Defender's worksheet (do this today)
- Write the lesson title, date and the exact lab target you are allowed to use.
- List three owned systems (VMs, apps, or cloud accounts) where this lesson applies.
- Run one safe check from the lesson on a lab system only. Paste the command and output.
- Write a two-sentence fix you would give a teammate.
- Name one related public advisory (CERT-In, CISA, NVD, or a vendor bulletin) with its date.
Indian workplace (sample data)
Suppose we are a junior analyst at Infosys, TCS, Wipro or a fintech SOC in Bengaluru/Pune. Turn this lesson into one checklist item with an owner, a due date and a place to store evidence (ticket + screenshot).
Global practice
Compare your notes with OWASP, CIS Benchmarks, NIST CSF/IR guidance or a cloud Well-Architected security question. Write five lines on what overlaps.
Everyday analogy
Explain the risk and the fix to a family member without jargon. If they can repeat the warning, you understand it well enough to teach juniors.
Key terms
- Control: a safeguard (patch, config, process, detection).
- Finding: a weakness backed by evidence.
- Remediation: the fix plus how you verified it.
- Scope: systems you have written permission to touch.
- Least privilege: only the access the task needs.
- Defence in depth: several layers so one failure does not end the story.
Common mistakes
- Skipping written permission "just for a quick scan".
- Practising on hostel, office or public targets without authorisation.
- Collecting tool output without writing the fix.
- Copying attack steps onto production to "verify". Defenders verify with versions, configs and patches.
- Publishing screenshots that contain secrets, cookies or internal hostnames.
Recap
- Evidence, fix, owner, date.
- Own lab only.
- Fix > spectacle.