<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Kirankunjumon on Medium]]></title>
        <description><![CDATA[Stories by Kirankunjumon on Medium]]></description>
        <link>https://medium.com/@kirankaithacode?source=rss-6fe5e9cbb9b5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*WE2x4O8KdX9GOJu6BxTrtQ.jpeg</url>
            <title>Stories by Kirankunjumon on Medium</title>
            <link>https://medium.com/@kirankaithacode?source=rss-6fe5e9cbb9b5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 17:50:22 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kirankaithacode/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Incident Response 101: The Complete Guide — From Basic Concepts to Advanced Practice]]></title>
            <link>https://medium.com/@kirankaithacode/incident-response-101-the-complete-guide-from-basic-concepts-to-advanced-practice-b64b87242dc0?source=rss-6fe5e9cbb9b5------2</link>
            <guid isPermaLink="false">https://medium.com/p/b64b87242dc0</guid>
            <category><![CDATA[san]]></category>
            <category><![CDATA[prevention]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[cyber-incident-response]]></category>
            <category><![CDATA[incident-response]]></category>
            <dc:creator><![CDATA[Kirankunjumon]]></dc:creator>
            <pubDate>Thu, 20 Aug 2026 08:38:44 GMT</pubDate>
            <atom:updated>2026-08-20T08:38:44.813Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RUlgOenFvhQQgmzmrHZ83A.png" /></figure><p>There’s a saying in cybersecurity that sounds grim but is essentially true: there’s no system that can’t be hacked, only systems that haven’t been hacked <em>yet</em>. No matter how much money an organization pours into prevention, a determined attacker will eventually find a crack. What separates organizations that recover quickly from those that end up in the news for months is one thing: <strong>Incident Response (IR)</strong>.</p><p>This guide walks through IR end to end — starting with the vocabulary every analyst needs first, moving through the frameworks and the six phases of a real response, and finishing with the playbooks, legal obligations, and crisis communication that determine whether the organization comes out the other side intact.</p><p><strong>What’s covered, in order:</strong></p><ol><li>The Basics — what IR actually is, and the vocabulary that everything else builds on</li><li>Frameworks &amp; Timing — NIST vs. SANS, and why the first hour matters so much</li><li>The Six Phases in Depth — Preparation through Lessons Learned, with real technical detail</li><li>Playbooks in Action — how the theory becomes a repeatable response for phishing and ransomware</li><li>Legal, Communication &amp; Metrics — the non-technical half of IR that often matters just as much</li></ol><h3>Part 1 — The Basics</h3><h3>1. What Is Incident Response?</h3><p><strong>Incident Response</strong> is the structured process of detecting, analyzing, containing, and managing the fallout of cybersecurity incidents — breaches, attacks, data leaks, and everything in between. The objective isn’t to prevent every attack (that’s impossible); it’s to minimize damage, shorten recovery time, and control cost once something has already gone wrong.</p><p>A mature IR process delivers four concrete benefits:</p><ul><li><strong>Rapid Response</strong> — the incident is noticed and acted on immediately, not discovered weeks later.</li><li><strong>A Structured Approach</strong> — the team follows pre-built procedures instead of improvising under pressure.</li><li><strong>Data Integrity</strong> — evidence is collected in a way that holds up legally, not destroyed by panic.</li><li><strong>Continuous Improvement</strong> — every incident makes the next response faster and sharper.</li></ul><h3>2. Event vs. Incident: A Distinction That Actually Matters</h3><p>These two words get used interchangeably in casual conversation, but in IR they mean very different things.</p><p>An <strong>event</strong> is simply anything observable happening on a system or network — a user connecting to a file share, a server rebooting, a routine web request landing on a server. Events happen constantly, all day, and almost none of them mean anything is wrong.</p><p>An <strong>incident</strong> (or security incident) is an event that actually violates security policy or poses a genuine risk — an unauthorized login attempt against a database, ransomware actively infecting a machine, a DDoS attack knocking a service offline.</p><p>The relationship is one-directional: <strong>every incident is an event, but not every event is an incident.</strong> Learning to tell the two apart quickly is arguably the single most important skill a junior analyst develops.</p><h3>3. The Teams Behind the Response: CSIRT, CERT, and SOC</h3><p>Three acronyms come up constantly, and they’re often confused with each other:</p><ul><li><strong>CSIRT (Computer Security Incident Response Team)</strong> — the team directly responsible for handling incidents: analyzing, responding to, and reporting on them.</li><li><strong>CERT (Computer Emergency Response Team)</strong> — frequently used as a synonym for CSIRT, though it sometimes refers to a national or sector-wide coordination body (like US-CERT) rather than a single organization’s internal team.</li><li><strong>SOC (Security Operations Center)</strong> — the 24/7 monitoring hub that receives and triages alerts first. SOC analysts typically handle initial “Tier 1” intervention, escalating to the CSIRT (Tier 2/3) when something looks genuinely serious.</li></ul><p>Think of the SOC as the emergency room triage nurse, and the CSIRT as the specialist surgeon called in once the case is confirmed critical.</p><h3>4. Why Bother? What Happens Without a Real IR Process</h3><p>Organizations that skip building a formal IR process tend to hit the same wall during an actual attack:</p><ul><li><strong>Panic and Chaos</strong> — nobody’s sure who’s supposed to do what.</li><li><strong>Loss of Evidence</strong> — critical logs get deleted or systems get shut down before anyone captures what happened, destroying the trail back to the attacker.</li><li><strong>Prolonged Dwell Time</strong> — the attacker quietly stays inside the network for days, weeks, or even months, undetected.</li><li><strong>Reputation Loss</strong> — customers and the public get incorrect or delayed information, which tends to do more lasting damage than the technical breach itself.</li></ul><h3>5. The Cycle, Not a Straight Line</h3><p>It’s tempting to think of incident response as a linear checklist that ends once the fire is out. In reality, it’s a <strong>cycle</strong> — every incident feeds back into and strengthens the Preparation phase for the next one. An organization that treats IR as “one and done” never actually improves; one that treats it as a loop gets measurably better with every incident it survives.</p><h3>Part 2 — Frameworks &amp; Timing</h3><h3>6. Two Dominant Models: NIST and SANS</h3><p>Two frameworks have become the accepted global standards for structuring incident response: one from <strong>NIST</strong> (National Institute of Standards and Technology), and one from the <strong>SANS Institute</strong>. Both describe essentially the same process — they just group and name the steps slightly differently.</p><h3>NIST SP 800–61 Rev. 2</h3><p>NIST’s “Computer Security Incident Handling Guide” groups the entire process into four broad phases:</p><ol><li><strong>Preparation</strong> — everything done before an incident ever happens.</li><li><strong>Detection &amp; Analysis</strong> — noticing that something happened and confirming what it actually is.</li><li><strong>Containment, Eradication, &amp; Recovery</strong> — stopping the attack, cleaning it out, and restoring normal operations, grouped together because these steps frequently overlap in practice.</li><li><strong>Post-Incident Activity</strong> — capturing lessons learned and formal reporting.</li></ol><h3>SANS PICERL Model</h3><p>SANS breaks the same process into six more granular steps, memorable by the acronym <strong>PICERL</strong>:</p><ul><li>Preparation</li><li>Identification</li><li>Containment</li><li>Eradication</li><li>Recovery</li><li>Lessons Learned</li></ul><h3>How They Map to Each Other</h3><p>NIST Phase SANS Phase Description Preparation Preparation Team establishment, tool preparation, policy creation Detection &amp; Analysis Identification Confirming the incident exists, determining scope Containment, Eradication, &amp; Recovery Containment Preventing the attack from spreading further Containment, Eradication, &amp; Recovery Eradication Removing the root cause — malware, backdoors, patching Containment, Eradication, &amp; Recovery Recovery Returning systems to normal operation, with monitoring Post-Incident Activity Lessons Learned “What went wrong? What went right?”</p><h3>Which One Should You Actually Use?</h3><p>In practice, the <strong>SANS PICERL model</strong> tends to dominate day-to-day operational work — its finer granularity makes it easier to write clear playbooks around. <strong>NIST</strong>, meanwhile, tends to show up more in official reporting and compliance contexts. What matters far more than memorizing either model word-for-word is understanding the underlying logic well enough to say, mid-crisis, “I am currently in the Containment phase” — and know exactly what that implies about what to do next.</p><h3>7. The Golden Hour</h3><p>Borrowed from emergency medicine, the <strong>Golden Hour</strong> concept applies directly to cybersecurity: the first hours after an attack is detected are the most critical window for tracing the attacker and limiting damage. Attackers know this too — they often race to delete logs or move laterally to other systems the moment they sense they’ve been noticed.</p><p>A well-rehearsed IR framework exists precisely to prevent panic during this window, so that an analyst under pressure always has an immediate answer to the only question that actually matters in the moment: <em>“What should I do right now?”</em></p><h3>8. IOCs, IOAs, and MITRE ATT&amp;CK</h3><p>Two more pieces of vocabulary round out the picture before diving into the phases themselves:</p><ul><li><strong>IOC (Indicator of Compromise)</strong> — evidence that an attack has <em>already happened</em>: a known-malicious file hash, a suspicious IP address, a specific registry key. IOCs are backward-looking — they tell you something bad already occurred.</li><li><strong>IOA (Indicator of Attack)</strong> — evidence of attacker <em>behavior and intent</em>, regardless of the specific tool used: a sequence like credential dumping followed by lateral movement. IOAs are forward-looking, and increasingly what modern detection tools focus on, since attackers change their tools constantly but rarely change their underlying tactics.</li></ul><p>That behavioral focus is exactly what the <strong>MITRE ATT&amp;CK framework</strong> formalizes — a publicly maintained knowledge base cataloging real-world attacker tactics and techniques (initial access, execution, persistence, privilege escalation, and so on). Many modern SOCs map their detections directly onto ATT&amp;CK technique IDs, which gives analysts a shared, precise vocabulary for describing exactly what stage of an attack they’re looking at — much more specific than just saying “suspicious activity.”</p><h3>Part 3 — The Six Phases in Depth</h3><h3>9. Preparation: The Phase Nobody Notices Until It’s Missing</h3><p>Preparation is simultaneously the most important and most neglected phase of the entire cycle. It’s the cybersecurity equivalent of a fire department discovering, mid-fire, that their hoses don’t work — and it splits into two categories.</p><h3>People &amp; Process</h3><p><strong>Team structure and communication</strong> — everyone needs to know exactly who to call. A maintained <strong>call tree</strong> should define the Primary Contact (who technically manages the incident), the Escalation path (CISO, CTO, as severity grows), and when Legal or PR need to be looped in.</p><p><strong>Policies and procedures</strong> — the organization’s written Incident Response Policy needs to define, in advance, what actually counts as an “incident” and who has the authority to take drastic action (like unplugging a production server).</p><p><strong>Training and simulations</strong> — teams should rehearse realistic scenarios before a real attack ever happens, through <strong>tabletop exercises</strong>. A typical prompt: <em>“On Monday morning, ransomware infects the entire company via an email that appears to be from the CEO. What do you do?”</em></p><h3>Technology &amp; Data</h3><p><strong>Log management and visibility</strong> — you cannot analyze what you never captured. Logs need to flow from endpoints, network devices, and applications into a centralized <strong>SIEM (Security Information and Event Management)</strong> system:</p><ul><li><strong>Endpoint logs</strong> — standard Windows Event Logs are often insufficient on their own; advanced tooling like <strong>Sysmon</strong>, plus PowerShell Script Block Logging, fills the gap.</li><li><strong>Network logs</strong> — firewall, proxy, and DNS logs.</li><li><strong>Application logs</strong> — web server access and error logs (IIS, Nginx, Apache).</li></ul><p><strong>Baselining</strong> — you can’t detect abnormal behavior if you never recorded what “normal” looks like. If an accounting server typically only sees traffic between 8 AM and 6 PM but suddenly uploads 5 GB of data at 3 AM, that’s only recognizable as an anomaly if the normal baseline was documented beforehand.</p><p><strong>Asset management</strong> — you need to know your organization’s “crown jewels”: the customer database, the source code repository, the Active Directory server — the systems that get top priority for protection and recovery. Each crown-jewel asset should also have an <strong>RTO and RPO</strong> defined in advance (covered in detail in the Recovery phase below) — deciding <em>now</em>, calmly, how much downtime and data loss is acceptable for that system is far better than negotiating it for the first time during an active crisis.</p><p><strong>The Incident Response toolkit</strong> — a clean, pre-assembled response kit that doesn’t depend on potentially compromised infrastructure:</p><ul><li>A clean, isolated laptop for analysis and secure communication.</li><li>Bootable forensics distributions (CAINE, SIFT Workstation).</li><li>Forensics tools like FTK Imager, KAPE, Volatility, and Eric Zimmerman’s tools.</li><li>Offline backups of critical systems and configurations.</li></ul><h3>Preparation Checklist</h3><ul><li>Is the Incident Response Plan actually written down?</li><li>Is the communication call tree current?</li><li>Are critical logs actually flowing into the SIEM?</li><li>Are backups tested with an actual restore drill, not just assumed to work?</li><li>Does the team have forensics tools ready — and know how to use them?</li></ul><h3>10. Detection &amp; Analysis: Uncovering What Attackers Try to Hide</h3><p>This is the most technically demanding phase of the cycle — noticing that something happened, and figuring out exactly what it is, while the attacker actively tries to stay hidden.</p><h3>Sources of Detection</h3><p>Incidents surface in two broad ways:</p><p><strong>Automated detections</strong> — SIEM correlation rules (e.g., ten failed logins from one IP within a minute), EDR flags on suspicious endpoint behavior, signature-based IDS/IPS alerts, and antivirus hits on known malware.</p><p><strong>Manual detections</strong> — a user reporting their computer “feels slow” or that their mouse is moving on its own, proactive <strong>threat hunting</strong> by analysts, or a third party (an ISP or national CERT) flagging botnet traffic coming from the organization’s IP range.</p><h3>Two Detection Philosophies</h3><p><strong>Signature-based detection</strong> looks for the known fingerprint of an existing threat — comparing a file’s hash against a database like VirusTotal. It has a low false-positive rate (it knows exactly what it’s looking for), but it’s blind to brand-new, zero-day, or polymorphic malware it’s never seen before.</p><p><strong>Anomaly/behavior-based detection</strong> looks for deviations from normal patterns instead — like winword.exe unexpectedly spawning powershell.exe, a combination that&#39;s technically possible but almost never legitimate. This approach can catch entirely unknown attacks, at the cost of a much higher false-positive rate, since legitimate unusual activity can trigger the same alarms.</p><h3>Validation and Triage</h3><p>Not every alert is a real incident. An analyst’s first job is <strong>triage</strong> — sorting out:</p><ul><li><strong>Is it real?</strong> A true positive, or a false positive?</li><li><strong>Scope</strong> — one laptop, or the entire network?</li><li><strong>Impact</strong> — which of the CIA triad’s pillars (confidentiality, integrity, availability) is actually at risk?</li></ul><p>A vulnerability scanner like Nessus generating thousands of “port scan” alerts during a scheduled test is a classic <strong>false positive</strong> — the alert fired, but there was no real threat. By contrast, seeing SQL syntax like UNION SELECT in a URL parameter, paired with an unusually large, successful (200 OK) response instead of a database error, is a strong signal of a <strong>true positive</strong> — an actual SQL injection attack succeeding.</p><h3>Severity Levels</h3><p>Incidents are typically bucketed by seriousness:</p><p>Level Example <strong>Low</strong> An individual virus infection cleaned automatically by antivirus <strong>Medium</strong> A policy violation affecting non-critical systems <strong>High</strong> Access to critical servers, a suspected data leak, active ransomware <strong>Critical</strong> Business continuity halted, large-scale data loss, reputational collapse</p><h3>Technical Investigation: Reading the Evidence</h3><p><strong>Web attack analysis</strong> relies heavily on reading raw HTTP traffic in server access logs. A normal search request for “iphone” looks unremarkable:</p><pre>GET /search.php?q=iphone HTTP/1.1<br>Host: vulnerable-shop.com</pre><p>An attacker probing for SQL injection might instead send:</p><pre>GET /search.php?q=iphone&#39; UNION SELECT 1,@@version-- HTTP/1.1<br>Host: vulnerable-shop.com</pre><p>Here, the single quote breaks out of the intended query, UNION SELECT appends a second query to pull additional data, @@version requests the database&#39;s version string, and -- comments out the rest of the original query so it doesn&#39;t cause a syntax error. If the response comes back 200 OK with the database version string embedded in the page — and a noticeably different Content-Length than a normal request — the injection likely succeeded.</p><p>A similar pattern shows up in <strong>command injection</strong>:</p><pre>POST /ping.php HTTP/1.1<br>Host: target-server.com</pre><pre>ip=127.0.0.1; cat /etc/passwd</pre><p>The semicolon acts as a command separator in Linux, letting a second command (cat /etc/passwd, which reads the system&#39;s user list) run right after the intended one. If lines resembling root:x:0:0:... show up in the response, the attack worked.</p><p><strong>Windows endpoint analysis</strong> looks for tell-tale anomalies in the process tree — svchost.exe running from somewhere other than C:\Windows\System32, lsass.exe spawned by an unexpected parent process, or deliberately misspelled process names like scvhost.exe mimicking a legitimate one. Analysts also check common <strong>persistence</strong> locations attackers use to survive a reboot — Registry Run keys, Scheduled Tasks, and the Startup folder — along with PowerShell&#39;s Event ID 4104, which reveals the actual (sometimes Base64-encoded) content of executed scripts.</p><p><strong>Memory (RAM) analysis</strong> catches what disk analysis misses entirely — even malware that never touches disk still leaves traces in memory. Tools like <strong>Volatility</strong> can recover hidden processes, active network connections, command history, and even copied passwords or credential hashes straight from a memory image.</p><h3>The Analyst’s Toolkit</h3><ul><li><strong>Wireshark</strong> — network traffic (PCAP) analysis</li><li><strong>Sysinternals Suite</strong> — deep Windows system analysis (Process Explorer, Autoruns)</li><li><strong>Volatility</strong> — memory forensics</li><li><strong>CyberChef</strong> — a general-purpose data decoding utility (Base64, hex, and more)</li></ul><h3>11. Containment: Stopping the Bleeding</h3><p>Once an incident is confirmed, the immediate priority shifts to preventing further spread — stopping <strong>lateral movement</strong> and data theft before eradication even begins.</p><h3>Short-Term Containment</h3><p>Immediate action, even before root-cause analysis is finished:</p><ul><li><strong>Isolation</strong> — physically or virtually disconnecting the affected machine’s network connection.</li><li><strong>IP blocking</strong> — blocking the attacker’s command-and-control (C2) server address at the firewall.</li><li><strong>Account lockout</strong> — disabling any user account suspected of being compromised.</li></ul><h3>Long-Term Containment</h3><p>Strengthening the environment before the actual cleanup begins:</p><ul><li><strong>Temporary fixes</strong> — a virtual patch or a new WAF (Web Application Firewall) rule shielding a vulnerable application.</li><li><strong>Segmentation</strong> — isolating the affected VLAN entirely from the rest of the network.</li><li><strong>Password resets</strong> — rotating administrator credentials, and in cases of a suspected Golden Ticket attack, changing the krbtgt account password <em>twice</em>.</li></ul><h3>Should You Just Pull the Plug?</h3><p>The instinctive reaction to a hack — shutting the machine off immediately — is often the wrong move, for two reasons:</p><ul><li><strong>Volatile evidence disappears.</strong> Malware traces in RAM, decryption keys, and active network connections all vanish the instant power is cut.</li><li><strong>You might trigger a dead man’s switch.</strong> Some attackers deliberately design malware to wipe or encrypt data the moment the connection is severed.</li></ul><p>The generally correct approach: if data loss risk is manageable, capture a RAM image first, then cut the network connection while the system keeps running, and analyze from there. The major exception is active ransomware mid-encryption — in that specific case, an immediate shutdown may genuinely be the better call to limit how much gets encrypted.</p><h3>Preserving Evidence</h3><p>If legal proceedings are a possibility, a <strong>forensic image</strong> (an exact copy) of the affected disks should be taken, along with its hash value (MD5/SHA256) — this proves later that the evidence wasn’t altered, forming the start of a proper <strong>chain of custody</strong>.</p><h3>12. Eradication: Sterilizing, Not Just Cleaning</h3><p>Once contained, the threat needs to be completely removed — and the door it came through needs to be shut for good.</p><h3>Find and Close the Root Cause</h3><p>Deleting the malware isn’t enough if the entry point stays open:</p><ul><li>If the attacker exploited a known vulnerability, the relevant patch has to actually be installed.</li><li>If they brute-forced RDP, password policy needs tightening and MFA needs to be turned on.</li><li>If a user clicked a phishing link, email gateway rules need tightening alongside renewed user training.</li></ul><h3>Malware Removal</h3><p>A full antivirus/EDR scan clears what automated tools can find; manual review is often still needed to catch persistence mechanisms — rogue registry entries or scheduled tasks — that automated scans miss entirely.</p><h3>Re-Imaging vs. Cleaning</h3><p>A hard-earned rule in the field: <em>once a system is compromised, you can never fully trust it again.</em> Advanced rootkits can bury themselves in the OS kernel or even firmware (BIOS/UEFI), invisible to antivirus. The professional default, accordingly, is to <strong>re-image from a clean, known-good build</strong> rather than attempt to clean an infected one — backing up <em>data only</em>, never executables, before wiping the disk.</p><h3>Renewing Credentials</h3><p>Any account the attacker may have touched needs new credentials: user passwords, service account passwords, database connection strings, SSH keys, and API tokens all get rotated.</p><h3>Hardening Beyond the Original State</h3><p>The goal isn’t to restore the system to exactly how it was — it’s to leave it more secure than before: closing unnecessary ports, enforcing least-privilege access, and increasing logging coverage.</p><h3>13. Recovery: Bringing Systems Back, Carefully</h3><p>Cleaned systems don’t go straight back into production — recovery is a deliberate, monitored process.</p><h3>RTO and RPO: The Two Numbers That Actually Define “Recovery”</h3><p>Before touching restoration steps, it’s worth naming the two metrics that quietly govern every recovery decision — because “how fast can we recover” and “how much data can we afford to lose” are two different questions with two different answers.</p><ul><li><strong>RTO (Recovery Time Objective)</strong> — the maximum acceptable amount of <em>downtime</em> before a system must be back online. If a payment processing server has an RTO of 2 hours, the business has decided it can tolerate being down for up to 2 hours, but not longer.</li><li><strong>RPO (Recovery Point Objective)</strong> — the maximum acceptable amount of <em>data loss</em>, measured in time. An RPO of 15 minutes means backups need to run frequently enough that, worst case, only the last 15 minutes of data is ever lost.</li></ul><p>These two numbers should be defined <strong>during the Preparation phase</strong>, not improvised mid-incident — because they directly decide backup frequency, backup type, and infrastructure spend. A database with a 15-minute RPO needs continuous or near-continuous backups; a low-priority internal wiki with a 24-hour RPO doesn’t.</p><p>Metric Answers the Question Drives <strong>RTO</strong> “How long can we be down?” Failover speed, redundant infrastructure, staffing for recovery <strong>RPO</strong> “How much data can we lose?” Backup frequency, replication strategy</p><h3>Backup Strategy: The Foundation Recovery Depends On</h3><p>A backup that hasn’t been tested is really just a hope, not a plan — which is why backup <em>strategy</em>, not just backup <em>existence</em>, matters so much during recovery.</p><p><strong>Backup types:</strong></p><ul><li><strong>Full backup</strong> — a complete copy of all data. Simple to restore from, but the slowest and most storage-heavy to create.</li><li><strong>Incremental backup</strong> — only the data that changed since the <em>last</em> backup (of any type). Fast and storage-efficient, but restoring requires replaying the full chain in order.</li><li><strong>Differential backup</strong> — only the data that changed since the <em>last full backup</em>. A middle ground: faster to restore than incremental, but larger than incremental over time.</li></ul><p><strong>The 3–2–1 rule</strong> — a widely used baseline for backup resilience: keep <strong>3</strong> total copies of data, on <strong>2</strong> different types of storage media, with <strong>1</strong> copy stored offsite (or offline/air-gapped). The offline copy specifically matters against ransomware — if backups are reachable from the same network as production, sophisticated ransomware will often encrypt the backups too.</p><p><strong>Restore testing</strong> — a backup that’s never been test-restored is unverified by definition. Regular restore drills are what actually confirm an RPO/RTO target is achievable in practice, rather than just assumed on paper.</p><h3>Restoration and Validation</h3><p>If restoring from backup, the backup’s date must predate the attack — otherwise a “time-bomb” version of the malware might already be baked into it. Functional tests confirm performance and connectivity are correct, and a final vulnerability scan runs before anything goes live.</p><h3>A Phased Rollout</h3><p>Rather than flipping every system back on simultaneously, recovery typically follows a sequence: critical infrastructure first (DNS, domain controllers), then business applications, and finally end-user access — watching each stage closely before moving to the next.</p><h3>Enhanced Monitoring</h3><p>Right after systems reopen, they’re effectively still “in intensive care.” Logging is often bumped to verbose/debug mode temporarily, alert thresholds get tightened (a rule that normally triggers at 10 failed logins might drop to 3), and custom alerts are written for the specific <strong>IOCs</strong> — IPs, filenames — seen during this particular attack.</p><h3>Declaring Recovery “Done”</h3><p>Management and the CSIRT lead typically decide together when normal operations officially resume, once: all affected systems are cleaned and patched, business processes run without interruption, and no suspicious activity has resurfaced for a defined window (commonly 48 hours).</p><h3>14. Post-Incident Activity: The Phase Most Teams Skip (and Shouldn’t)</h3><p>Once the adrenaline fades, it’s tempting to just close the file. But this phase is arguably the most valuable part of the entire cycle.</p><h3>The Lessons Learned Meeting</h3><p>Usually held within two weeks of closing the incident, this is a <strong>constructive</strong> analysis, not a blame session. Key questions include:</p><ul><li>Exactly what happened, and when?</li><li><strong>MTTD (Mean Time To Detect)</strong> — how long did it take to notice?</li><li><strong>MTTR (Mean Time To Respond)</strong> — how long did it take to resolve?</li><li>Which procedures worked, and which didn’t?</li><li>Were any tools missing or insufficient?</li><li>Was there a communication breakdown anywhere?</li></ul><h3>The Incident Report</h3><p>A formal report goes to management, legal, and auditors where relevant — pairing an executive summary with the full technical detail underneath it.</p><h3>Metrics and KPIs</h3><p>Concrete numbers make IR improvement measurable over time:</p><ul><li><strong>False Positive Rate</strong> — what share of alerts turned out to be nothing?</li><li><strong>Detection Time</strong> — how long after the attack began did anyone notice?</li><li><strong>Containment Time</strong> — how long from noticing to actually stopping the attacker?</li></ul><h3>Closing the Loop</h3><p>Once recommendations from this phase get implemented, the Preparation phase is updated — and the cycle begins again, stronger than before. This is the step that actually turns “we got hacked” into “we got better.”</p><h3>Part 4 — Playbooks in Action</h3><p>Every incident is unique, but common incident <em>types</em> — phishing, malware, DDoS — tend to follow recognizable patterns. <strong>Playbooks</strong> (or runbooks) capture the step-by-step response for each type, so nobody has to improvise from scratch mid-crisis.</p><h3>15. Phishing Analysis Playbook</h3><p><strong>Goal:</strong> determine whether a suspicious email is genuinely malicious, and protect anyone who interacted with it.</p><p><strong>Trigger</strong> — a user report (via a “Report Phishing” button) or an email gateway alert. Common tools: sandboxes (Cuckoo, Joe Sandbox), header analyzers, URL scanners.</p><p><strong>Analysis steps:</strong></p><ul><li><strong>Header analysis</strong> — do the Return-Path and From addresses actually match? Do SPF/DKIM/DMARC checks pass or fail? A sender like admin@paypal-support.com (a lookalike domain) displaying as &quot;PayPal Support&quot; is a classic red flag.</li><li><strong>Body and link analysis</strong> — hover over links without clicking to reveal the real destination, then check it against VirusTotal or URLScan.io. Shortened URLs deserve extra scrutiny.</li><li><strong>Attachment analysis</strong> — detonate the file in an isolated sandbox, and check its hash against threat intelligence sources.</li></ul><p><strong>Containment &amp; eradication (if confirmed malicious):</strong></p><ul><li>Purge the email from every mailbox across the organization.</li><li>Blacklist the sending domain and IP.</li><li>Identify anyone who clicked the link via proxy logs.</li><li>Reset the passwords of anyone who clicked, and scan their machines.</li></ul><h3>16. Ransomware Playbook</h3><p><strong>Goal:</strong> stop the spread and recover data with minimal loss.</p><p><strong>Trigger</strong> — a ransom note appearing, file extensions suddenly changing (.locked, .enc), or a SIEM alert for abnormally high-frequency file modification.</p><p><strong>Containment (the highest-stakes step):</strong></p><ul><li>Cut the network connection immediately — but do <strong>not</strong> power the system off, since it may still be needed for RAM analysis.</li><li>Isolate the affected VLAN via switch or firewall to block lateral movement.</li><li>Temporarily disable or lock file shares to read-only.</li></ul><p><strong>Analysis:</strong></p><ul><li>Identify the ransomware variant (WannaCry, Ryuk, Conti, etc.) — often by submitting the ransom note or an encrypted sample to a service like ID Ransomware.</li><li>Determine the entry point (RDP, phishing, an unpatched vulnerability) — skipping this step just invites a repeat attack.</li><li>Check whether a free decryptor exists for that specific variant through a resource like the No More Ransom project.</li></ul><p><strong>Recovery:</strong></p><ul><li>Fully wipe and reimage affected systems — never attempt to simply “clean” a ransomware-infected machine.</li><li>Restore data from a backup that predates the attack.</li><li>Scan restored data with up-to-date antivirus before trusting it again.</li></ul><h3>17. Beyond Manual Playbooks: SOAR and Automation</h3><p>As the volume of alerts an organization faces keeps climbing, many teams now encode these same playbooks into <strong>SOAR (Security Orchestration, Automation, and Response)</strong> platforms. Instead of an analyst manually running each step above, a SOAR platform can automatically pull a suspicious email’s hash, check it against threat intelligence, and — if the risk score crosses a threshold — auto-purge it from every mailbox without waiting for a human to act first. This doesn’t replace the analyst’s judgment; it just removes the repetitive, time-sensitive steps so human attention goes where it’s actually needed most: ambiguous, high-stakes decisions.</p><h3>Part 5 — Legal, Communication &amp; Metrics</h3><p>Incident response isn’t purely technical — how an organization documents evidence and communicates during a crisis often determines the outcome as much as the technical response does.</p><h3>18. Chain of Custody</h3><p><strong>Chain of custody</strong> is the documented record of who handled a piece of evidence — a disk, a log file, a USB drive — from the moment it was collected until it’s presented in court, including where it was stored and confirmation that its integrity was never compromised. If this chain breaks — evidence left in an unlocked room, for instance — a court may deem it unreliable and throw it out entirely.</p><p>A proper Chain of Custody form typically records: the case ID, a description of the item (brand, model, serial number), the original hash value at collection time, a timestamp, and exactly who transferred custody to whom, with signatures.</p><h3>19. Data Protection and Notification Obligations</h3><p>In most jurisdictions, notifying regulators and affected individuals after a personal data breach isn’t optional — it’s a legal requirement, and getting it wrong carries real financial and reputational consequences.</p><p>The <strong>GDPR</strong> (General Data Protection Regulation) is widely treated as the global benchmark, requiring notification to the relevant supervisory authority within 72 hours of becoming aware of a breach. Many other regions enforce comparable notification windows and penalties.</p><p>Because these clocks start ticking the moment a breach is discovered, the IR team needs continuous, real-time coordination with Legal and Compliance from very early on. One question in particular tends to determine whether formal legal obligations even get triggered: <em>is there personally identifiable information (PII) among the exposed data?</em></p><h3>20. Crisis Communication</h3><p>Who talks to whom, and how, needs to be decided well before an actual incident.</p><p><strong>Internally</strong>, the “need-to-know” principle typically applies — details are shared with the relevant technical team to avoid unnecessary panic, rather than broadcast company-wide immediately.</p><p><strong>Externally</strong>, customers deserve transparency without being buried in technical jargon; only a designated spokesperson should speak to the press; and cooperation with legal authorities or cybercrime units should go through the appropriate formal channels.</p><h3>Communication Mistakes Worth Avoiding</h3><ul><li><strong>Speaking too early</strong> — declaring “no data was stolen” only to walk it back days later destroys credibility far more than a delayed, accurate statement would have.</li><li><strong>Staying silent too long</strong> — if customers hear about a breach on social media before the organization says anything, trust erodes immediately, regardless of how the technical response went.</li></ul><h3>21. A Simple Incident Report Structure</h3><p>Since the report is the artifact that outlives the actual crisis, it helps to have a consistent shape:</p><ol><li><strong>Executive Summary</strong> — what happened, impact, and current status, written for a non-technical audience.</li><li><strong>Timeline</strong> — a chronological account from initial compromise through containment and recovery.</li><li><strong>Technical Findings</strong> — root cause, indicators of compromise, and affected systems.</li><li><strong>Response Actions Taken</strong> — what was done at each phase, and by whom.</li><li><strong>Metrics</strong> — MTTD, MTTR, and any other KPIs tracked.</li><li><strong>Recommendations</strong> — concrete changes to feed back into the Preparation phase.</li></ol><h3>Final Thoughts</h3><p>Incident response isn’t a single skill — it’s a discipline that blends fast technical triage, careful evidence handling, legal awareness, and honest communication, all under real time pressure. The organizations that come out of a breach stronger aren’t the ones that never get hacked — that’s not realistic for anyone. They’re the ones that treat every incident as a loop back into Preparation, turning “we got hit” into “we’re measurably better prepared for next time.”</p><p>That, ultimately, is the whole point of the cycle: not preventing the unpreventable, but making sure that when it happens, the damage is contained, the evidence survives, and the organization learns something it didn’t know before.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b64b87242dc0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Built by No One, Run by Everyone: A Deep Dive into Internet Governance and Routing]]></title>
            <link>https://medium.com/@kirankaithacode/built-by-no-one-run-by-everyone-a-deep-dive-into-internet-governance-and-routing-5a672b3efcfe?source=rss-6fe5e9cbb9b5------2</link>
            <guid isPermaLink="false">https://medium.com/p/5a672b3efcfe</guid>
            <category><![CDATA[routing]]></category>
            <category><![CDATA[ip-address]]></category>
            <category><![CDATA[icann]]></category>
            <category><![CDATA[internet]]></category>
            <category><![CDATA[ip]]></category>
            <dc:creator><![CDATA[Kirankunjumon]]></dc:creator>
            <pubDate>Tue, 07 Jul 2026 07:12:55 GMT</pubDate>
            <atom:updated>2026-07-07T07:12:55.040Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vLmmeWWD18k2i1vbcOpk8A.png" /></figure><h3>How the Internet Actually Works: From Vint Cerf’s TCP/IP to the IP Address on Your Phone</h3><p>We use “the internet” like it’s one single thing, but it’s really a layered system: a handful of global organizations setting policy, a tiered system of regional and national registries handing out address space, undersea cables physically carrying the data, and routing protocols deciding which path your data takes across thousands of independently-run networks. This post walks through the entire stack — history, governance, and the actual physical/logical journey of a packet — in one place.</p><h3>Where It All Began: ARPANET and TCP/IP</h3><p>The story starts in 1969 with <strong>ARPANET</strong>, a U.S. Department of Defense project (via ARPA, the Advanced Research Projects Agency) that became the first network to use <strong>packet switching</strong> — breaking data into small packets, sending them independently, and reassembling them at the destination. This design choice is why the internet is decentralized and fault-tolerant to this day.</p><p>In the 1970s, <strong>Vint Cerf</strong> and <strong>Robert Kahn</strong> co-invented <strong>TCP/IP</strong> (Transmission Control Protocol/Internet Protocol), the protocol suite that let separate, incompatible networks interconnect and exchange data reliably. This breakthrough is what turned a collection of isolated networks into an actual “network of networks” — the internet as we know it. Cerf is widely credited as one of the “fathers of the internet” for this work, and later went on to help found the Internet Society.</p><h3>The Standards Bodies: Who Decides How Things Work</h3><p>Three organizations are worth knowing here, and they’re often confused with each other:</p><ul><li><strong>IETF (Internet Engineering Task Force)</strong> — the open, volunteer-driven body that develops the actual technical protocols and standards (HTTP, TCP/IP refinements, etc.), published as RFCs (Request for Comments).</li><li><strong>IEEE (Institute of Electrical and Electronics Engineers)</strong> — a much broader global engineering body, not internet-specific, but responsible for standardizing key hardware/link-layer technologies like Ethernet (802.3) and Wi-Fi (802.11).</li><li><strong>ISOC (Internet Society)</strong> — a nonprofit founded in 1992, with Cerf as a founding figure, that promotes an open internet and serves as the organizational home for IETF.</li></ul><p>These bodies define <em>how</em> things should technically work. They don’t allocate addresses — that’s a separate chain of organizations.</p><h3>The Address Allocation Hierarchy: Who Gives You an IP</h3><p>No single company owns IP address space. It flows down through a strict hierarchy:</p><p><strong>ICANN → IANA → RIR → NIR → ISP → End User</strong></p><ul><li><strong>ICANN (Internet Corporation for Assigned Names and Numbers)</strong> — a California-based nonprofit (founded 1998) that sets global policy for domain names, IP address allocation, and protocol parameters.</li><li><strong>IANA (Internet Assigned Numbers Authority)</strong> — a function operated by ICANN. This is the actual operator: it maintains the DNS root zone, assigns protocol/port numbers, and allocates large IP blocks to five Regional Internet Registries.</li><li><strong>RIR (Regional Internet Registry)</strong> — five regional bodies split the world: <strong>APNIC</strong> (Asia-Pacific), <strong>ARIN</strong> (North America), <strong>RIPE NCC</strong> (Europe/Middle East/Central Asia), <strong>LACNIC</strong> (Latin America/Caribbean), and <strong>AFRINIC</strong> (Africa). They manage allocation within their region.</li><li><strong>NIR (National Internet Registry)</strong> — a country-level layer under an RIR. India’s NIR is <strong>IRINN</strong> (Indian Registry for Internet Names and Numbers), operated by <strong>NIXI</strong>, which allocates IPs and AS numbers to Indian ISPs and organizations.</li><li><strong>ISP (Internet Service Provider)</strong> — gets blocks from the NIR/RIR and distributes individual addresses or smaller blocks to end users.</li><li><strong>End User</strong> — your device, typically getting a dynamic IP via DHCP from your ISP.</li></ul><h3>How IP Blocks Actually Get Split Up (Subnetting &amp; CIDR)</h3><p>Addresses aren’t handed out one at a time — they’re distributed in blocks using <strong>CIDR notation</strong> (e.g., 203.0.113.0/24), where the number after the slash indicates how many bits are fixed for the network portion, leaving the rest for individual devices.</p><p>A typical allocation chain looks like this:</p><ol><li>IANA gives APNIC a huge block — say a /8 (~16.7 million addresses).</li><li>APNIC gives IRINN, or a large ISP directly, a /16 (~65,000 addresses).</li><li>IRINN gives an ISP like Jio or Airtel a /20 or /22, sized to their customer base.</li><li>The ISP gives a business a smaller block — maybe a /28 (16 addresses) — or a single address to a home user.</li></ol><p>This nested splitting (a /16 breaks into 256 /24s, each /24 breaks into smaller /28s, etc.) means organizations of any size get an appropriately sized chunk without wasting address space. Companies also use subnetting internally to segment networks — separate IP ranges for, say, finance, engineering, and guest Wi-Fi — for security and traffic management.</p><p>Companies and servers generally get <strong>static IPs</strong> (fixed, since they need to be reliably reachable), while home users typically get <strong>dynamic IPs</strong>, reassigned periodically via DHCP since they don’t need a fixed address.</p><h3>How Data Actually Crosses the World</h3><p>Allocation is the logical layer. Here’s the physical and routing layer that makes global communication work.</p><p><strong>Submarine cables.</strong> Despite the popular image of satellites, more than 95% of international internet traffic travels through undersea fiber-optic cables, often laid by consortiums of ISPs and tech giants like Google and Meta. Data moves as light pulses through fiber at near light-speed.</p><p><strong>Internet Exchange Points (IXPs).</strong> These are physical data centers where multiple ISPs connect directly to exchange traffic locally instead of routing it internationally. In India, NIXI operates IXPs in cities like Mumbai, Delhi, and Chennai so domestic traffic stays domestic — cheaper and faster than sending it abroad and back.</p><p><strong>Tiered ISP structure.</strong></p><ul><li><strong>Tier 1</strong> ISPs (e.g., Lumen, NTT, Tata Communications) own the global backbone and peer directly with each other, paying no one for transit.</li><li><strong>Tier 2</strong> ISPs (e.g., Jio, Airtel) peer with some networks but pay Tier 1s for transit to reach distant parts of the world.</li><li><strong>Tier 3</strong> ISPs are local, last-mile providers buying connectivity from Tier 2s to deliver to homes and businesses.</li></ul><p><strong>BGP (Border Gateway Protocol).</strong> Once your data is on the network, BGP decides the actual path packets take across thousands of independently-operated networks, called Autonomous Systems (each with its own <strong>ASN</strong>, also allocated by RIRs/NIRs). BGP routers continuously exchange information about the best-known paths to every IP block, automatically rerouting around failures — which is why the internet keeps working even when a cable gets cut.</p><p><strong>Packet switching.</strong> True to its ARPANET roots, data is broken into packets, each tagged with destination info, sent independently (sometimes via different routes), and reassembled at the destination. This is the core design that makes the internet decentralized and resilient.</p><h3>Putting It All Together: The Full Journey of a Request</h3><ol><li>You type a website address. Your device needs an IP, resolved via <strong>DNS</strong> (also overseen by ICANN/IANA).</li><li>Packets leave your device through your home router, using your <strong>ISP-assigned IP</strong>.</li><li>They travel up through your ISP’s network (Tier 3 → Tier 2).</li><li>If the destination is far away, packets pass through an <strong>IXP</strong> and onto a <strong>Tier 1 backbone</strong>, potentially via a <strong>submarine cable</strong>.</li><li><strong>BGP routing</strong> determines the actual path across multiple Autonomous Systems.</li><li>Packets arrive at the destination server’s ISP, then the server itself — which has its own static IP from its own allocation chain.</li><li>The server responds, and packets retrace a path (not necessarily the same one) back to you.</li></ol><h3>A Few Extra Things Worth Knowing</h3><ul><li><strong>IPv4 exhaustion.</strong> IPv4 (the original 32-bit system, ~4.3 billion addresses) ran out of fresh allocations at the RIR level years ago — a major reason <strong>IPv6</strong> (128-bit, effectively unlimited) exists, though global adoption is still gradual.</li><li><strong>ASNs and BGP go together.</strong> Every ISP or large network needs an ASN to participate in BGP routing, and these are allocated through the same RIR/NIR chain as IP addresses.</li><li><strong>ICANN vs. IETF, one more time.</strong> ICANN handles naming/addressing <em>policy and allocation</em>. IETF handles the <em>technical protocol standards</em> everything runs on. They’re complementary layers of the same overall system, not competitors.</li><li><strong>NIXI does double duty.</strong> Beyond running IRINN (India’s NIR), NIXI also operates the country’s IXPs, keeping a meaningful share of India’s internet traffic routed domestically.</li></ul><p>None of this is centrally “run” by any one company or government — it’s a deliberately distributed system of policy bodies, regional registries, ISPs, and physical infrastructure that, layer by layer, turns a request typed into a browser into a packet that can find its way anywhere on Earth and back.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5a672b3efcfe" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Self-Hosting Plane OSS on Linux with Docker Compose — Complete Guide]]></title>
            <link>https://medium.com/@kirankaithacode/self-hosting-plane-oss-on-linux-with-docker-compose-complete-guide-b502e6aee59d?source=rss-6fe5e9cbb9b5------2</link>
            <guid isPermaLink="false">https://medium.com/p/b502e6aee59d</guid>
            <category><![CDATA[devsecops]]></category>
            <category><![CDATA[project-management]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[planes]]></category>
            <category><![CDATA[docker-compose]]></category>
            <dc:creator><![CDATA[Kirankunjumon]]></dc:creator>
            <pubDate>Mon, 06 Jul 2026 04:36:09 GMT</pubDate>
            <atom:updated>2026-07-06T04:36:09.822Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xpITHCFuqLZx6jO5uYuWqQ.png" /></figure><h3>Introduction</h3><p>Plane is an open-source project management tool — a self-hostable alternative to Jira, Linear, and Asana. This guide walks you through a clean, production-safe local installation using the official setup script, plus how to lock it down so anonymous users can’t sign up or create workspaces.</p><h3>Prerequisites</h3><ul><li>Linux machine (Ubuntu/Debian recommended)</li><li>Docker and Docker Compose installed</li><li>Minimum 2 CPU cores, 4GB RAM</li><li>curl and bash available</li></ul><p>Install Docker if you haven’t:</p><pre>curl -fsSL https://get.docker.com | sh -</pre><h3>Step 1 — Download the Official Setup Script</h3><pre>mkdir ~/plane-selfhost<br>cd ~/plane-selfhost<br>curl -fsSL -o setup.sh https://github.com/makeplane/plane/releases/latest/download/setup.sh<br>chmod +x setup.sh</pre><h3>Step 2 — Run the Installer</h3><pre>./setup.sh</pre><p>When prompted:</p><pre>Select a Action you want to perform:<br>   1) Install<br>   2) Start<br>   3) Stop<br>   4) Restart<br>   5) Upgrade<br>   6) View Logs<br>   7) Backup Data<br>   8) Exit</pre><ul><li>Enter 1 to <strong>Install</strong></li><li>Enter 8 to <strong>Exit</strong> after install completes</li></ul><p>This creates a plane-app folder with the official docker-compose.yaml and plane.env files.</p><h3>Step 3 — Configure Environment Variables</h3><pre>cd ~/plane-selfhost/plane-app<br>nano plane.env</pre><p>Set these key values:</p><pre># Your IP or domain<br>WEB_URL=http://localhost<br>CORS_ALLOWED_ORIGINS=http://localhost</pre><pre># Secret key — generate a strong one<br>SECRET_KEY=your-random-secret-key-here</pre><pre># Database (leave defaults for fresh install)<br>POSTGRES_USER=plane<br>POSTGRES_PASSWORD=plane<br>POSTGRES_DB=plane</pre><pre># Redis<br>REDIS_URL=redis://plane-redis:6379/</pre><pre># RabbitMQ<br>RABBITMQ_USER=plane<br>RABBITMQ_PASSWORD=plane<br>RABBITMQ_VHOST=plane</pre><pre># Storage (MinIO)<br>AWS_ACCESS_KEY_ID=access-key<br>AWS_SECRET_ACCESS_KEY=secret-key<br>AWS_S3_BUCKET_NAME=uploads</pre><pre># Live service<br>API_BASE_URL=http://api:8000<br>LIVE_SERVER_SECRET_KEY=your-random-live-secret-here</pre><pre># Proxy<br>SITE_ADDRESS=:80<br>NGINX_PORT=80</pre><p>Generate secret keys:</p><pre>openssl rand -hex 32   # use output for SECRET_KEY<br>openssl rand -hex 32   # use output for LIVE_SERVER_SECRET_KEY</pre><h3>Step 4 — Start Plane</h3><pre>cd ~/plane-selfhost<br>./setup.sh<br># Enter 2 to Start</pre><p>Wait for all services to come up. You’ll see:</p><pre>Plane Server started successfully ✅<br>You can access the application at http://localhost</pre><h3>Step 5 — Verify All Containers Are Running</h3><pre>cd ~/plane-selfhost/plane-app<br>docker compose ps</pre><p>All containers should show Up or healthy. Key services:</p><p>Container Role web Frontend (nginx) admin God Mode UI (nginx) api Backend API worker / beat-worker Background jobs live Real-time collaboration proxy Caddy reverse proxy plane-db PostgreSQL database plane-redis Redis/Valkey cache plane-mq RabbitMQ message queue plane-minio MinIO object storage</p><h3>Step 6 — Complete Instance Setup</h3><p>Visit http://localhost in your browser and complete the initial setup:</p><ol><li>Set your <strong>instance admin email and password</strong></li><li>Configure <strong>SMTP</strong> for email (/god-mode → Email)</li><li>Set up authentication methods (/god-mode → Authentication)</li></ol><h3>Step 7 — Lock Down for Production (Critical)</h3><p>This is the most important step. By default, anyone who reaches your instance can sign up and create workspaces. Fix both:</p><h3>Disable open signups</h3><p>Go to http://localhost/god-mode → <strong>Authentication</strong></p><p>Turn <strong>OFF</strong> → <em>“Allow anyone to sign up without an invite”</em></p><h3>Prevent workspace creation</h3><p>Go to http://localhost/god-mode → <strong>Workspaces</strong></p><p>Turn <strong>ON</strong> → <em>“Prevent anyone from creating a workspace”</em></p><p>Now only you (the instance admin) can create workspaces and invite users.</p><h3>Step 8 — Configure SMTP (for invite emails)</h3><p>Go to http://localhost/god-mode → <strong>Email</strong> and fill in:</p><pre>Host: smtp.your-provider.com<br>Port: 587<br>Username: your-email@domain.com<br>Password: your-smtp-password<br>From address: noreply@domain.com</pre><p>Test it using the <strong>Send Test Email</strong> button.</p><h3>Useful Commands</h3><pre># Start<br>./setup.sh  # Enter 2</pre><pre># Stop<br>./setup.sh  # Enter 3</pre><pre># Restart<br>./setup.sh  # Enter 4</pre><pre># View logs<br>./setup.sh  # Enter 6</pre><pre># Or directly<br>cd plane-app<br>docker compose logs -f api<br>docker compose logs -f web<br>docker compose ps</pre><h3>Summary</h3><p>What Where App URL http://localhost</p><p>God Mode http://localhost/god-mode</p><p>Config file ~/plane-selfhost/plane-app/plane.env</p><p>Compose file ~/plane-selfhost/plane-app/docker-compose.yaml</p><p>Setup script ~/plane-selfhost/setup.sh</p><p>That’s it — you now have a fully self-hosted, locked-down Plane instance running locally. 🎉</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b502e6aee59d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Installing SonarQube with Docker Compose (Including Plugin Installation)]]></title>
            <link>https://medium.com/@kirankaithacode/installing-sonarqube-with-docker-compose-including-plugin-installation-c349c69ea4b1?source=rss-6fe5e9cbb9b5------2</link>
            <guid isPermaLink="false">https://medium.com/p/c349c69ea4b1</guid>
            <category><![CDATA[devsecops]]></category>
            <category><![CDATA[docker-compose]]></category>
            <category><![CDATA[sonarqube-setup]]></category>
            <category><![CDATA[code-review]]></category>
            <category><![CDATA[sonarqube]]></category>
            <dc:creator><![CDATA[Kirankunjumon]]></dc:creator>
            <pubDate>Mon, 06 Jul 2026 04:35:24 GMT</pubDate>
            <atom:updated>2026-07-06T04:35:24.615Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u5yzp2UJjD6pDBi8nBF52A.png" /></figure><p>This guide walks through spinning up a fresh SonarQube + PostgreSQL stack using Docker Compose, avoiding common Docker networking pitfalls, and manually installing the Community Branch Plugin for PR/branch analysis.</p><h3>Step 1: Define the Docker Compose Stack</h3><p>Create a docker-compose.yml file with its own container names, network, volumes, and port.</p><pre>name: sonarqube<br>services:<br>  sonarqube:<br>    image: sonarqube:community<br>    container_name: sonarqube<br>    depends_on:<br>      - db<br>    environment:<br>      - SONAR_JDBC_URL=jdbc:postgresql://postgres-sonar:5432/sonar<br>      - SONAR_JDBC_USERNAME=sonar<br>      - SONAR_JDBC_PASSWORD=sonar<br>    volumes:<br>      - sonarqube_data:/opt/sonarqube/data<br>      - sonarqube_extensions:/opt/sonarqube/extensions<br>      - sonarqube_logs:/opt/sonarqube/logs<br>      - sonarqube_conf:/opt/sonarqube/conf<br>    ports:<br>      - &quot;9000:9000&quot;<br>    networks:<br>      - sonarnet<br>    restart: unless-stopped<br>  db:<br>    image: postgres:15<br>    container_name: postgres-sonar<br>    environment:<br>      - POSTGRES_USER=sonar<br>      - POSTGRES_PASSWORD=sonar<br>      - POSTGRES_DB=sonar<br>    volumes:<br>      - postgres_data:/var/lib/postgresql/data<br>    networks:<br>      - sonarnet<br>    restart: unless-stopped<br>networks:<br>  sonarnet:<br>volumes:<br>  sonarqube_data:<br>  sonarqube_extensions:<br>  sonarqube_logs:<br>  sonarqube_conf:<br>  postgres_data:</pre><p>A few design choices worth calling out:</p><ul><li>The top-level name: field pins the Compose project name explicitly. Without this, Compose derives the project name from the current directory, which can cause conflicts if you run multiple stacks.</li><li>A dedicated conf volume is included so that any manual configuration changes (like plugin javaagent flags, covered later) survive container restarts and recreation — without it, edits to sonar.properties are lost the moment the container is rebuilt.</li></ul><h3>Step 2: Bring the Stack Up</h3><pre>docker compose -f docker-compose.yml up -d</pre><h3>Common Errors and Fixes</h3><p><strong>“all predefined address pools have been fully subnetted”</strong> Docker has run out of auto-assignable subnet ranges, usually from accumulated unused networks. Clean up first:</p><pre>docker network prune</pre><p><strong>“Pool overlaps with other one on this address space”</strong> If you manually pin a subnet via ipam.config, it may collide with another existing Docker network. Check what&#39;s already in use:</p><pre>docker network inspect $(docker network ls -q) --format &#39;{{.Name}}: {{range .IPAM.Config}}{{.Subnet}}{{end}}&#39;</pre><p>Then either pick a free range or simply remove the ipam block entirely and let Docker assign one automatically (the simpler, generally preferred option).</p><p><strong>“Container name already in use”</strong> A leftover container from a previous failed attempt is occupying the name:</p><pre>docker rm -f &lt;container_name&gt;</pre><p>Once these are resolved, docker compose up -d should create the network, volumes, and both containers cleanly. Access the instance at http://&lt;host&gt;:9000 — default credentials are admin / admin, with a forced password change on first login.</p><h3>Step 3: Installing a Plugin Manually</h3><p>SonarQube’s official Docker image doesn’t include wget or curl, so plugins need to be downloaded on the host and copied into the container.</p><h3>3.1 Download the Plugin on the Host</h3><p>For this guide, we’re installing the Community Branch Plugin, which adds branch analysis and pull request decoration — a feature otherwise gated behind SonarQube’s commercial editions.</p><pre>curl -L -o sonarqube-community-branch-plugin-26.5.0.jar \<br>  https://github.com/mc1arke/sonarqube-community-branch-plugin/releases/download/26.5.0/sonarqube-community-branch-plugin-26.5.0.jar</pre><p>Always verify the plugin version matches your SonarQube version’s compatibility requirements before installing — check the plugin’s release notes on GitHub.</p><p>Confirm the download is a valid archive, not a truncated file or an HTML error page:</p><pre>file sonarqube-community-branch-plugin-26.5.0.jar</pre><p>It should report something like Zip archive data. If it reports HTML document or ASCII text, the download failed silently — retry with -L to follow redirects.</p><h3>3.2 Copy the Plugin into the Container</h3><pre>docker cp sonarqube-community-branch-plugin-26.5.0.jar sonarqube:/opt/sonarqube/extensions/plugins/</pre><p>Verify the file landed with the correct size:</p><pre>docker exec sonarqube bash -c &#39;ls -la /opt/sonarqube/extensions/plugins/&#39;</pre><p>If ownership shows as your host UID instead of the sonarqube user, fix it to avoid permission issues:</p><pre>docker exec -u root sonarqube bash -c &#39;chown sonarqube:root /opt/sonarqube/extensions/plugins/sonarqube-community-branch-plugin-26.5.0.jar&#39;</pre><h3>3.3 Configure the Java Agent (Plugin-Specific Step)</h3><p>Unlike most SonarQube plugins, which just need to sit in the plugins/ folder, the Community Branch Plugin patches the JVM at startup and requires an explicit -javaagent flag in sonar.properties:</p><pre>docker exec -u root sonarqube bash -c &#39;<br>echo &quot;sonar.web.javaAdditionalOpts=-javaagent:./extensions/plugins/sonarqube-community-branch-plugin-26.5.0.jar=web&quot; &gt;&gt; /opt/sonarqube/conf/sonar.properties<br>echo &quot;sonar.ce.javaAdditionalOpts=-javaagent:./extensions/plugins/sonarqube-community-branch-plugin-26.5.0.jar=ce&quot; &gt;&gt; /opt/sonarqube/conf/sonar.properties<br>&#39;</pre><blockquote><strong><em>Note:</em></strong><em> </em><em>sonar.properties is read-only for non-root users by default (</em><em>-r-xr-x---). Running this as </em><em>-u root bypasses the permission restriction, since root ignores standard Unix file permission bits on files it doesn&#39;t own.</em></blockquote><h3>3.4 Restart and Verify</h3><pre>docker restart sonarqube<br>docker logs -f sonarqube</pre><p>Watch for this line confirming the plugin loaded correctly:</p><pre>INFO  web[][o.s.s.p.ServerPluginManager] Deploy Community Branch Plugin / 26.5.0 / ...</pre><p>If the server fails to start with Error opening zip file or JAR manifest missing, the jar copied into the container is corrupted or incomplete — re-verify the file size matches the host copy exactly, and re-copy if needed.</p><p>Once SonarQube is fully up, confirm the plugin is active in the UI under <strong>Administration → Marketplace → Installed</strong>, and configure pull request decoration under <strong>Administration → General Settings → Pull Request Decoration</strong>.</p><h3>Troubleshooting Checklist</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pf-36Uq_xMhbdFkgMFFJNg.png" /></figure><h3>Final Notes</h3><p>Keep a Postgres backup before any schema-affecting changes:</p><pre>docker exec postgres-sonar pg_dump -U sonar sonar &gt; sonar_backup_$(date +%F).sql</pre><ul><li>The Community Branch Plugin is community-maintained, not officially supported by SonarSource — there’s no supported migration path from it to the commercial Developer/Enterprise editions if you change your mind later.</li><li>Always pin plugin versions to your exact SonarQube release; mismatches between plugin and server version are a common source of silent failures.</li></ul><p>With this setup, you get a fully working SonarQube instance — with branch/PR analysis enabled via the Community Branch Plugin — running via Docker Compose.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c349c69ea4b1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Trigger Jenkins Jobs from GitLab Webhooks by Branch]]></title>
            <link>https://medium.com/@kirankaithacode/how-to-trigger-jenkins-jobs-from-gitlab-webhooks-by-branch-4e317106d339?source=rss-6fe5e9cbb9b5------2</link>
            <guid isPermaLink="false">https://medium.com/p/4e317106d339</guid>
            <category><![CDATA[tigger]]></category>
            <category><![CDATA[webhooks]]></category>
            <category><![CDATA[jenkins]]></category>
            <category><![CDATA[devsecops]]></category>
            <category><![CDATA[gitlab]]></category>
            <dc:creator><![CDATA[Kirankunjumon]]></dc:creator>
            <pubDate>Sat, 04 Jul 2026 05:27:14 GMT</pubDate>
            <atom:updated>2026-07-04T05:58:44.144Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Rwt7JSts8puiFu1N6v3pjA.png" /></figure><p>A step-by-step guide to wiring GitLab push events to separate Jenkins jobs for staging and main branches using the Generic Webhook Trigger plugin.</p><h3>Prerequisites</h3><ul><li>Jenkins installed and running</li><li>GitLab repository with at least a staging and main branch</li><li>Network access from GitLab to your Jenkins instance (or ngrok for local testing)</li></ul><h3>Step 1 — Install the Generic Webhook Trigger Plugin</h3><ol><li>Go to <strong>Manage Jenkins → Plugins → Available plugins</strong></li><li>Search for <strong>Generic Webhook Trigger</strong></li><li>Install it and restart Jenkins</li></ol><h3>Step 2 — Configure Job A (staging branch)</h3><p>Open your staging job → <strong>Configure</strong> → scroll to <strong>Build Triggers</strong> → check <strong>Generic Webhook Trigger</strong>.</p><h3>Post Content Parameters</h3><p>Add a new parameter to extract the branch name from the payload:</p><pre>Variable: branch<br>Expression: $.ref</pre><blockquote><strong><em>Expression type:</em></strong><em> JSONPath</em></blockquote><h3>Token</h3><p>Set a unique token that GitLab will send to identify this job:</p><pre>staging-token</pre><h3>Optional Branch Filter</h3><p>Enable the filter so this job only runs when the push targets staging:</p><pre>Filter text:<br>$branch</pre><pre>Filter regexp:<br>refs/heads/staging</pre><h3>Step 3 — Configure Job B (main branch)</h3><p>Repeat the same steps as Job A, with these values changed:</p><h3>Post Content Parameters</h3><pre>Variable: branch<br>Expression: $.ref</pre><h3>Token</h3><pre>main-token</pre><h3>Optional Branch Filter</h3><pre>Filter text:<br>$branch</pre><pre>Filter regexp:<br>refs/heads/main</pre><h3>Step 4 — Test the Webhook Locally</h3><p>Before connecting GitLab, verify each job fires correctly using curl.</p><p><strong>Test staging trigger:</strong></p><pre>curl -X POST &quot;http://JENKINS_URL/generic-webhook-trigger/invoke?token=staging-token&quot; \<br>  -H &quot;Content-Type: application/json&quot; \<br>  -d &#39;{&quot;ref&quot;: &quot;refs/heads/staging&quot;}&#39;</pre><p><strong>Test main trigger:</strong></p><pre>curl -X POST &quot;http://JENKINS_URL/generic-webhook-trigger/invoke?token=main-token&quot; \<br>  -H &quot;Content-Type: application/json&quot; \<br>  -d &#39;{&quot;ref&quot;: &quot;refs/heads/main&quot;}&#39;</pre><p>A successful response looks like:</p><pre>{<br>  &quot;jobs&quot;: {<br>    &quot;your-job-name&quot;: {<br>      &quot;triggered&quot;: true,<br>      &quot;id&quot;: 42,<br>      &quot;url&quot;: &quot;queue/item/42/&quot;<br>    }<br>  }<br>}</pre><h3>Running Jenkins locally?</h3><p>If Jenkins is not publicly reachable, expose it temporarily with <a href="https://ngrok.com/">ngrok</a>:</p><pre>ngrok http 8080</pre><p>Note the https://xxxx.ngrok.io URL — use it in place of http://JENKINS_URL in the steps below.</p><h3>Step 5 — Add Webhooks in GitLab</h3><p>Go to your GitLab project → <strong>Settings → Webhooks → Add new webhook</strong>.</p><p>Create <strong>two separate webhooks</strong>, one for each job.</p><h3>Webhook 1 — staging</h3><pre>URL:<br>http://JENKINS_URL/generic-webhook-trigger/invoke?token=staging-token</pre><p><strong>Trigger:</strong></p><pre>✅ Push events<br>   A commit or branch is pushed.</pre><p><strong>Branch filter</strong> — select <strong>Wildcard pattern</strong>, then enter:</p><pre>staging</pre><blockquote><em>This tells GitLab to only send the POST when a push happens on the </em><em>staging branch.</em></blockquote><h3>Webhook 2 — main</h3><pre>URL:<br>http://JENKINS_URL/generic-webhook-trigger/invoke?token=main-token</pre><p><strong>Trigger:</strong></p><pre>✅ Push events<br>   A commit or branch is pushed.</pre><p><strong>Branch filter</strong> — select <strong>Wildcard pattern</strong>, then enter:</p><pre>main</pre><p>Save each webhook.</p><h3>Step 6 — Test the Connection from GitLab</h3><p>After saving each webhook, GitLab provides a built-in test button. Use it to confirm Jenkins receives the event before doing a real push.</p><h3>How to run the test</h3><ol><li>Go to <strong>Settings → Webhooks</strong> in your GitLab project</li><li>Find the webhook you just created and click <strong>Edit</strong></li><li>Scroll to the bottom — you will see a <strong>Test</strong> dropdown button</li><li>Click <strong>Test → Push events</strong></li></ol><p>GitLab will immediately send a sample push payload to your Jenkins URL.</p><h3>What to check in GitLab</h3><p>GitLab shows the result inline right after the test fires:</p><pre>✅ Hook executed successfully: HTTP 200</pre><p>If you see a non-200 status or a connection error, see the Troubleshooting section below.</p><h3>What to check in Jenkins</h3><ol><li>Open the Jenkins job (Job A for staging, Job B for main)</li><li>Look at the <strong>Build History</strong> on the left — a new build #N should appear</li><li>Click the build → <strong>Console Output</strong> and confirm it ran without errors</li></ol><p>If the build was triggered but the optional filter blocked it, you will see a line like:</p><pre>Skipped due to optional filter: expected refs/heads/staging but got refs/heads/main</pre><p>That means the filter is working correctly — the wrong job simply ignored the event.</p><h3>GitLab test payload note</h3><p>The GitLab test button sends a <strong>sample payload</strong>, not a real commit. The ref field in that payload is typically refs/heads/master. Because of this, the optional branch filter inside Jenkins <strong>will block</strong> the test build — that is expected and normal.</p><p>To do a fully end-to-end test with a real payload, make an empty commit on the staging branch and push it:</p><pre>git checkout staging<br>git commit --allow-empty -m &quot;test: trigger webhook&quot;<br>git push origin staging</pre><p>Then check the Jenkins build history again — Job A should fire and the console output should show the branch matched correctly.</p><h3>How It Works</h3><pre>GitLab push (staging) ──► /invoke?token=staging-token ──► branch filter: refs/heads/staging ──► Job A<br>GitLab push (main)    ──► /invoke?token=main-token    ──► branch filter: refs/heads/main    ──► Job B</pre><p>The flow has two layers of filtering:</p><ol><li><strong>GitLab branch filter</strong> — GitLab only sends the POST for pushes to the specified branch</li><li><strong>Jenkins optional filter</strong> — Jenkins double-checks the $branch value against the regexp before triggering the build</li></ol><p>Both layers together ensure that a push to staging never accidentally triggers the main job and vice versa.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BL6RKU8KpRu5JkSKk0fKsw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4e317106d339" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Integrating DefectDojo with Jenkins: A Complete CI/CD DevSecOps Setup Guide]]></title>
            <link>https://medium.com/@kirankaithacode/integrating-defectdojo-with-jenkins-a-complete-ci-cd-devsecops-setup-guide-3fb5d01493fa?source=rss-6fe5e9cbb9b5------2</link>
            <guid isPermaLink="false">https://medium.com/p/3fb5d01493fa</guid>
            <category><![CDATA[defectdojo]]></category>
            <category><![CDATA[jenkins]]></category>
            <category><![CDATA[vulnerability]]></category>
            <category><![CDATA[vulnerability-management]]></category>
            <category><![CDATA[devsecops]]></category>
            <dc:creator><![CDATA[Kirankunjumon]]></dc:creator>
            <pubDate>Fri, 03 Jul 2026 11:48:00 GMT</pubDate>
            <atom:updated>2026-07-04T06:02:10.244Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UlTMLE7q7ppS0MB1347Ldw.png" /></figure><p>Automated vulnerability management is only as useful as the pipeline feeding it. In this guide, we’ll go end-to-end: standing up DefectDojo with Docker Compose, configuring it for API access, and wiring it into a Jenkins pipeline so every build automatically pushes scan results into a centralized dashboard.</p><p>By the end, you’ll have:</p><ul><li>A running DefectDojo instance</li><li>A Product and Engagement configured for CI/CD findings</li><li>Deduplication is enabled so re-runs don’t spam your findings list</li><li>A Jenkins pipeline that runs a security scan and uploads results to DefectDojo automatically</li></ul><h3>Prerequisites</h3><ul><li>A Linux server (or local machine) with <strong>Docker</strong> and <strong>Docker Compose</strong> installed</li><li><strong>Git</strong> installed</li><li>A Jenkins instance (existing or new) with admin access</li><li>Network connectivity between Jenkins and the DefectDojo host</li><li>At least 4 GB RAM free for DefectDojo’s containers (Postgres, Redis, Celery workers, nginx, uwsgi)</li></ul><h3>Part 1 — Deploy DefectDojo with Docker Compose</h3><h3>1.1 Clone the repository</h3><pre>git clone https://github.com/DefectDojo/django-DefectDojo<br>cd django-DefectDojo</pre><h3>1.2 (Optional) Configure your .env file</h3><p>DefectDojo ships with sensible defaults, but for anything beyond a quick test you should set your own admin password and secrets rather than relying on auto-generation.</p><pre>cp dojo/settings/template-behind-proxy.env dojo/settings/.env.prod  # only needed for reverse-proxy setups</pre><p>For a standard local/dev setup, the default docker-compose.yml env vars are enough. If you want to pin the admin password explicitly instead of letting DefectDojo generate one, set it before first boot:</p><pre>export DD_ADMIN_PASSWORD=&#39;YourStrongPasswordHere&#39;</pre><blockquote><em>If you don’t set </em><em>DD_ADMIN_PASSWORD, DefectDojo auto-generates one during initialization and writes it to the initializer logs — see step 1.4.</em></blockquote><h3>1.3 Start the application</h3><pre>docker compose up -d</pre><p>This pulls/builds the images and starts:</p><ul><li>nginx — web front end (port 8080 / 8443)</li><li>uwsgi — Django application server</li><li>celerybeat / celeryworker — async task processing</li><li>postgres — database</li><li>redis — message broker</li><li>initializer — one-shot container that runs migrations, loads fixtures, and creates the admin user</li></ul><h3>1.4 Watch initialization complete</h3><pre>docker compose logs -f initializer</pre><p><strong>✅ Success indicator:</strong> you’ll see System check identified no issues in the logs. First-time initialization can take <strong>5–10 minutes</strong> (some environments report as little as 3 minutes, depending on host resources).</p><h3>1.5 Retrieve the admin password</h3><p>If you didn’t set DD_ADMIN_PASSWORD yourself, pull the auto-generated password from the initializer logs:</p><pre>docker compose logs initializer | grep &quot;Admin password:&quot;</pre><p>Or, if referencing the Django container directly (older setups):</p><pre>docker logs defectdojo_django 2&gt;&amp;1 | grep &quot;Admin password:&quot;</pre><h3>1.6 Log in</h3><p>Open your browser to:</p><ul><li>http://localhost:8080 — default HTTP</li><li>https://localhost:8443 — if SSL is configured</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ygq4LUsXZxSqbyqsDlKxLA.png" /></figure><h3>Part 2 — Initial DefectDojo Configuration</h3><h3>2.1 Generate your API key</h3><p>DefectDojo’s REST API (v2) is what Jenkins will use to push scan results.</p><ol><li>Click your <strong>username</strong> (top-right corner)</li><li>Select <strong>API v2 Key</strong></li><li>Copy the token — you’ll paste this into Jenkins as a secret credential</li></ol><p>Keep this token secure; anyone with it can create/read findings under your account’s permissions.</p><h3>2.2 Create a Product</h3><p>A <strong>Product</strong> represents the application or repository you’re scanning.</p><p>Go to <strong>Products → + New Product</strong></p><p>Fill in:</p><ul><li><strong>Name</strong>: e.g. MyApp</li><li><strong>Product Type</strong>: e.g. Web</li></ul><p>Save, then note the <strong>Product ID</strong> from the URL: /product/1/ → ID is 1</p><h3>2.3 Create an Engagement</h3><p>An <strong>Engagement</strong> groups a set of test results (e.g., one per pipeline, sprint, or release train).</p><p>Go to <strong>Products → MyApp → Engagements → + Add New Engagement</strong></p><p>Set:</p><ul><li><strong>Name</strong>: CI/CD Pipeline</li><li><strong>Engagement Type</strong>: CI/CD</li><li><strong>Status</strong>: In Progress</li><li><strong>Start/End dates</strong>: set appropriately (many teams use a rolling “always on” engagement for CI/CD)</li></ul><p>Save, then note the <strong>Engagement ID</strong> from the URL: /engagement/1/ → ID is 1</p><h3>2.4 Enable deduplication (recommended)</h3><p>Without deduplication, every pipeline run re-imports the same findings as brand-new entries.</p><ol><li>Go to <strong>System Settings → Findings</strong></li><li>Enable <strong>Deduplication</strong></li></ol><p>This ensures repeated scans update existing findings (or leave them alone) instead of creating duplicates on every build.</p><h3>Part 3 — Configure Jenkins</h3><h3>3.1 Install required plugins</h3><p><strong>Manage Jenkins → Plugins → Available</strong>, search for and install:</p><ul><li><strong>Pipeline</strong> (usually pre-installed)</li><li><strong>Credentials Binding</strong></li><li><strong>HTTP Request</strong> (optional — useful if you want to call the DefectDojo API directly from pipeline steps rather than via a CLI tool)</li></ul><h3>3.2 Store the DefectDojo API key as a Jenkins credential</h3><p><strong>Manage Jenkins → Credentials → System → Global credentials → + Add Credentials</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wwF1nN9RKjX8byPfTjxZgg.png" /></figure><h3>3.3 Store the DefectDojo URL</h3><p>Add a second credential:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*07N-n40SAI5xI1YCuOZ86g.png" /></figure><p>Storing the URL as a credential (rather than hardcoding it) keeps your Jenkinsfile portable across environments (dev/staging/prod DefectDojo instances).</p><h3>Part 4 — Build the Jenkins Pipeline Job</h3><h3>4.1 Create a new Pipeline job</h3><ol><li><strong>New Item → Pipeline</strong> → give it a name (e.g. myapp-security-scan) → <strong>OK</strong></li></ol><h3>4.2 Point it to your repository</h3><p>Under the <strong>Pipeline</strong> section:</p><ul><li><strong>Definition</strong>: Pipeline script from SCM</li><li><strong>SCM</strong>: Git</li><li><strong>Repository URL</strong>: your repo’s Git URL</li><li><strong>Branch</strong>: e.g. main</li><li><strong>Script Path</strong>: Jenkinsfile</li></ul><p>Save the job.</p><h3>4.3 Add the Jenkinsfile</h3><p>Create a Jenkinsfile at the root of your repository. Below is a working example that runs a <strong>Trivy</strong> filesystem/dependency scan and uploads the results to DefectDojo using the <strong>import-scan</strong> API endpoint. Swap Trivy for whatever scanner you use (OWASP Dependency-Check, ZAP, Semgrep, Bandit, etc.) — DefectDojo supports 180+ scan report formats.</p><pre>pipeline {<br>    agent any environment {<br>        DOJO_API_KEY = credentials(&#39;defectdojo-api-key&#39;)<br>        DOJO_URL     = credentials(&#39;defectdojo-url&#39;)<br>        PRODUCT_NAME = &#39;MyApp&#39;<br>        ENGAGEMENT_ID = &#39;1&#39;   // from Part 2.3<br>    }<br><br>    stages {<br>            stage(&#39;Checkout&#39;) {<br>                steps {<br>                    checkout scm<br>                }<br>            }<br>            stage(&#39;Run Security Scan&#39;) {<br>                steps {<br>                    sh &#39;&#39;&#39;<br>                        docker run --rm -v $(pwd):/repo aquasec/trivy fs \<br>                            --format json --output /repo/trivy-report.json /repo<br>                    &#39;&#39;&#39;<br>                }<br>            }<br>            stage(&#39;Upload Results to DefectDojo&#39;) {<br>                steps {<br>                    sh &#39;&#39;&#39;<br>                        curl -sS -X POST &quot;$DOJO_URL/api/v2/import-scan/&quot; \<br>                            -H &quot;Authorization: Token $DOJO_API_KEY&quot; \<br>                            -F &quot;engagement=$ENGAGEMENT_ID&quot; \<br>                            -F &quot;scan_type=Trivy Scan&quot; \<br>                            -F &quot;file=@trivy-report.json&quot; \<br>                            -F &quot;active=true&quot; \<br>                            -F &quot;verified=false&quot; \<br>                            -F &quot;close_old_findings=true&quot; \<br>                            -F &quot;scan_date=$(date +%Y-%m-%d)&quot;<br>                    &#39;&#39;&#39;<br>                }<br>            }<br>        }<br>        post {<br>            always {<br>                archiveArtifacts artifacts: &#39;trivy-report.json&#39;, allowEmptyArchive: true<br>            }<br>            failure {<br>                echo &#39;Pipeline failed - check scan or upload step logs.&#39;<br>            }<br>        }<br>}</pre><p><strong>Key parameters to note in the </strong><strong>import-scan call:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WgzOowFEothwxxIJTIJUjA.png" /></figure><p>If you later want <strong><em>re-imports</em></strong> to merge into the same test (rather than creating a new test each run), use /api/v2/reimport-scan/ with a test ID instead of /import-scan/.</p><h3>Part 5 — Verify the Integration</h3><ol><li>Trigger a build in Jenkins (manually or via a webhook/SCM trigger)</li><li>Watch the console output — confirm the scan runs and the curl upload returns a 201 Created response</li><li>In DefectDojo, go to <strong>Products → MyApp → Engagements → CI/CD Pipeline</strong></li><li>You should see a new <strong>Test</strong> with findings imported from the scan</li><li>Run the pipeline a second time and confirm — thanks to deduplication — you don’t get duplicate findings, just updated ones</li></ol><h3>Wrap-up</h3><p>You now have a fully automated loop: code changes trigger Jenkins, Jenkins runs your scanner of choice, and results land in DefectDojo — deduplicated, triaged, and ready for your security team to review. From here, natural next steps include:</p><ul><li>Adding <strong>Jira integration</strong> in DefectDojo for automatic ticket creation on new findings</li><li>Setting <strong>SLA policies</strong> per severity in DefectDojo</li><li>Expanding the Jenkinsfile to run multiple scanners in parallel stages (SAST + SCA + DAST) and import each into its own Test within the same Engagement</li><li>Gating the Jenkins pipeline (failure on critical findings) using the DefectDojo API to query finding counts before allowing a deploy stage to proceed</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3fb5d01493fa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Build Your Own Private Docker Registry Locally (With UI + Security)]]></title>
            <link>https://medium.com/@kirankaithacode/build-your-own-private-docker-registry-locally-with-ui-security-e40aa5b55d08?source=rss-6fe5e9cbb9b5------2</link>
            <guid isPermaLink="false">https://medium.com/p/e40aa5b55d08</guid>
            <category><![CDATA[cicd-pipeline]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[private-docker-registry]]></category>
            <category><![CDATA[sonatype]]></category>
            <category><![CDATA[nginx]]></category>
            <dc:creator><![CDATA[Kirankunjumon]]></dc:creator>
            <pubDate>Sat, 16 May 2026 06:13:34 GMT</pubDate>
            <atom:updated>2026-05-16T06:13:34.673Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NhSRShHddjkfDKh3JbFwRA.png" /></figure><h3>Why you need this</h3><p>If you are building a DevSecOps pipeline, you will quickly hit Docker Hub’s limitation of only <strong>one free private image</strong>. The options are to pay for Docker Hub Pro, or host your own private registry. Hosting your own gives you more control, no rate limits, full audit logs, and the ability to integrate vulnerability scanning into your pipeline.</p><p>This guide walks you through the full journey — from a zero-install state to a working private registry with a web UI and proper authentication, running entirely on your local machine.</p><h3>What we are building</h3><p>By the end of this guide you will have:</p><ul><li><strong>Nexus Repository OSS</strong> running locally as your private Docker registry</li><li>A clean <strong>web UI</strong> to browse images (like a self-hosted Docker Hub)</li><li><strong>Login-protected</strong> access — no anonymous browsing</li><li><strong>Role-based users</strong> — separate admin and CI/CD accounts</li><li>A <strong>push and pull workflow</strong> that works from the same machine and from other servers on your network</li><li>A clear migration path to a real domain when you are ready to go live</li></ul><h3>Pre Requisites</h3><p>Make sure you have these on your machine before starting:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/aaa0fde04e95fa5290b88cc4ce303044/href">https://medium.com/media/aaa0fde04e95fa5290b88cc4ce303044/href</a></iframe><p>You can verify whether Docker and Docker Compose are already installed and working by running these commands instead of reinstalling.</p><h3>1. Check Docker Installation</h3><pre>docker --version</pre><p>Example output:</p><pre>Docker version 27.1.1, build 6312585</pre><h3>2. Check Docker Compose Installation</h3><p>New Docker versions include Compose as a plugin.</p><pre>docker compose version</pre><p>Example:</p><pre>Docker Compose version v2.29.1</pre><p>If you installed the old standalone version:</p><pre>docker-compose --version</pre><h3>3. Check Docker Service Status</h3><pre>sudo systemctl status docker</pre><p>You should see:</p><pre>Active: active (running)</pre><h3>4. Verify Docker Works Properly</h3><p>Run a test container:</p><pre>docker run hello-world</pre><p>If Docker is working correctly, you will see:</p><pre>Hello from Docker!</pre><h3>5. Check Whether Your User Is Already in Docker Group</h3><p>The command below checks whether you already have permission to run Docker without sudo.</p><pre>groups</pre><p>If you see docker in the list, you already executed:</p><pre>sudo usermod -aG docker $USER</pre><p>Example:</p><pre>username sudo docker</pre><h3>6. Verify Non-Sudo Docker Access</h3><p>Try:</p><pre>docker ps</pre><ul><li>If it works without sudo, everything is already configured.</li><li>If you get:</li></ul><pre>permission denied while trying to connect to the Docker daemon socket</pre><p>then add yourself to the docker group:</p><pre>sudo usermod -aG docker $USER<br>newgrp docker</pre><h3>7. Check Docker Compose Functionality</h3><p>Create a quick test:</p><pre>docker compose version<br>docker compose ls</pre><p>If these work, Compose is properly installed.</p><p>Install Docker if you have not already:</p><pre>curl -fsSL https://get.docker.com | sh<br>sudo usermod -aG docker $USER<br>newgrp docker</pre><h3>Part 1 — Why Nexus over plain Docker Registry</h3><p>You might have heard of the official registry:2 image from Docker. It works, but it has no web UI and no built-in access control beyond basic htpasswd files. Getting a UI working on top of it involves fighting CORS issues (the browser cannot call the registry API directly without special headers).</p><p><strong>Nexus Repository OSS Features</strong></p><p>Nexus Repository OSS solves all of this in one container:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ccf88f74f53a95f2bb376acee2e2a200/href">https://medium.com/media/ccf88f74f53a95f2bb376acee2e2a200/href</a></iframe><p>Nexus is used by thousands of teams in production and is completely free as the OSS edition.</p><h3>Part 2 — Setting up Nexus locally</h3><h3>Step 1 — Create the project folder</h3><pre>mkdir ~/nexus-registry &amp;&amp; cd ~/nexus-registry<br>mkdir nexus-data<br>sudo chown -R 200:200 nexus-data</pre><p>The chown command is important — Nexus runs as UID 200 inside the container and needs write access to the data directory.</p><h3>Step 2 — Create docker-compose.yml</h3><pre>version: &#39;3.8&#39;<br>services:<br>  nexus:<br>    image: sonatype/nexus3:latest<br>    container_name: nexus<br>    restart: always<br>    ports:<br>      - &quot;8081:8081&quot;     # Web UI<br>      - &quot;8082:8082&quot;     # Private Docker registry<br>      - &quot;8083:8083&quot;     # Docker Hub proxy cache (optional)<br>    environment:<br>      - INSTALL4J_ADD_VM_PARAMS=-Xms512m -Xmx1200m -XX:MaxDirectMemorySize=1200m<br>    volumes:<br>      - ./nexus-data:/nexus-data</pre><p>Port 8081 is your web UI. Port 8082 is where you push and pull Docker images. Port 8083 is optional — it acts as a Docker Hub proxy cache so your CI pipeline never hits Docker Hub rate limits.</p><h3>Step 3 — Start Nexus</h3><pre>docker compose up -d</pre><p>Nexus takes 2–3 minutes to fully start on first boot. Watch the logs:</p><pre>docker compose logs -f nexus</pre><p>Wait for this line before proceeding:</p><pre>Started Sonatype Nexus OSS</pre><h3>Step 4 — Get the auto-generated admin password</h3><pre>docker exec nexus cat /nexus-data/admin.password</pre><p>Copy that password — you will use it once to log in and then replace it with your own.</p><h3>Part 3 — Initial configuration in the UI</h3><p>Open http://localhost:8081 in your browser.</p><ol><li>Click <strong>Sign In</strong> (top right) → username admin, password from the previous step</li><li>The setup wizard will launch. Set a new strong admin password</li><li>When asked about anonymous access — select <strong>Disable</strong>. This is the key security step. With anonymous access disabled, nobody can view or pull images without logging in first</li><li>Click <strong>Finish</strong></li></ol><h3>Part 4 — Create a Docker hosted repository</h3><p>In the UI go to <strong>⚙ Settings → Repository → Repositories → Create repository</strong>.</p><p>Select <strong>docker (hosted)</strong> and fill in:</p><p><strong>Repository Configuration</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/48184aaf89c7a92e35189c161a4eefb1/href">https://medium.com/media/48184aaf89c7a92e35189c161a4eefb1/href</a></iframe><p>Click <strong>Create repository</strong>. Nexus will now start listening on port 8082 for Docker push and pull requests.</p><h3>Enable the Docker Bearer Token realm</h3><p>This step is required for docker login to work with Nexus. Without it you will get authentication errors even with correct credentials.</p><p>Go to <strong>⚙ Settings → Security → Realms</strong> and move <strong>Docker Bearer Token Realm</strong> from the Available column to the Active column. Click <strong>Save</strong>.</p><h3>Configure Docker to trust the local registry (Optional for Local Setup only)</h3><p>Since Nexus is running over HTTP locally (not HTTPS), you need to tell Docker to allow insecure connections to it.</p><p>Edit or create /etc/docker/daemon.json:</p><pre>sudo nano /etc/docker/daemon.json</pre><pre>{<br>  &quot;insecure-registries&quot;: [&quot;localhost:8082&quot;, &quot;127.0.0.1:8082&quot;]<br>}</pre><p>Fully restart Docker:</p><pre>sudo systemctl stop docker<br>sudo systemctl stop docker.socket<br>sudo systemctl start docker</pre><p>Confirm Docker picked up the setting:</p><pre>docker info | grep -A5 &quot;Insecure Registries&quot;</pre><p>You should see localhost:8082 listed.</p><h3>Part 8 — Pull from another machine on your network</h3><p>Find your machine’s LAN IP:</p><pre>hostname -I<br># e.g. 192.168.1.50</pre><p>On the other machine, add the insecure registry entry:</p><pre>sudo nano /etc/docker/daemon.json</pre><pre>{<br>  &quot;insecure-registries&quot;: [&quot;192.168.1.50:8082&quot;]<br>}</pre><pre>sudo systemctl stop docker &amp;&amp; sudo systemctl stop docker.socket &amp;&amp; sudo systemctl start docker</pre><p>Then log in and pull:</p><pre>docker login 192.168.1.50:8082<br>docker pull 192.168.1.50:8082/myapp/nginx:alpine</pre><h3>Production — Mapping a Domain Through Nginx Proxy Manager to a Private Server Nginx with Port-Based Routing</h3><p>Yes — that is a perfectly valid architecture and actually very clean. Here is exactly how it works:</p><pre>Internet<br>    ↓<br>registry.yourdomain.com (HTTPS :443)<br>    ↓<br>Nginx Proxy Manager  ← handles TLS cert, terminates SSL<br>    ↓  HTTP (internal)<br>Private server Nginx  ← routes based on path/endpoint<br>    ↓              ↓<br>  :8081          :8082<br>Nexus UI      Docker API</pre><p>NPM owns the certificate. Your private server Nginx just does internal routing — no SSL needed there at all.</p><h3>Install Nginx on the private server</h3><pre>sudo apt update<br>sudo apt install -y nginx</pre><h3>Create the Nginx routing config</h3><pre>sudo nano /etc/nginx/sites-available/nexus</pre><p>Paste this:</p><pre>server {<br>    listen 80;<br>    server_name _;          # accepts any hostname since NPM already matched the domain</pre><pre>    # Large image upload support<br>    client_max_body_size 0;<br>    chunked_transfer_encoding on;<br>    proxy_read_timeout 900;<br>    proxy_send_timeout 900;<br>    proxy_connect_timeout 900;</pre><pre>    # Docker registry API → Nexus port 8082<br>    location /v2/ {<br>        proxy_pass         <a href="http://127.0.0.1:8082;">http://127.0.0.1:8082;</a><br>        proxy_set_header   Host              $host;<br>        proxy_set_header   X-Real-IP         $remote_addr;<br>        proxy_set_header   X-Forwarded-For   $proxy_add_x_forwarded_for;<br>        proxy_set_header   X-Forwarded-Proto $http_x_forwarded_proto;<br>        proxy_set_header   Authorization     $http_authorization;<br>        proxy_pass_header  Authorization;<br>    }</pre><pre>    # Everything else → Nexus UI port 8081<br>    location / {<br>        proxy_pass         <a href="http://127.0.0.1:8081;">http://127.0.0.1:8081;</a><br>        proxy_set_header   Host              $host;<br>        proxy_set_header   X-Real-IP         $remote_addr;<br>        proxy_set_header   X-Forwarded-For   $proxy_add_x_forwarded_for;<br>        proxy_set_header   X-Forwarded-Proto $http_x_forwarded_proto;<br>    }<br>}</pre><p>Enable it:</p><pre>sudo ln -s /etc/nginx/sites-available/nexus /etc/nginx/sites-enabled/<br>sudo nginx -t          # verify config is valid<br>sudo systemctl reload nginx</pre><h3>Configure NPM to forward to private server Nginx</h3><p>In NPM → <strong>Proxy Hosts → Add Proxy Host</strong>:</p><p><strong>Details tab:</strong></p><p>Field Value Domain Names registry.yourdomain.com Scheme http Forward Hostname / IP 192.168.x.x (private server IP) Forward Port 80 (private Nginx listens here) Websockets Support On Block Common Exploits On</p><p><strong>Advanced tab</strong> — paste this so NPM correctly forwards the protocol header (critical for Nexus to know it is being accessed over HTTPS):</p><pre>proxy_set_header X-Forwarded-Proto $scheme;<br>proxy_set_header X-Forwarded-Host  $host;<br>proxy_set_header X-Real-IP         $remote_addr;<br>proxy_set_header Authorization     $http_authorization;<br>proxy_pass_header Authorization;<br>client_max_body_size 0;<br>proxy_read_timeout 900;</pre><p><strong>SSL tab:</strong></p><p>Field Value SSL Certificate Request new Let’s Encrypt cert Force SSL On HTTP/2 Support On</p><p>Click <strong>Save</strong>.</p><h3>Tell Nexus its public URL</h3><p>In Nexus UI → <strong>⚙ Administration → System → Capabilities → Base URL</strong>:</p><pre>https://registry.yourdomain.com</pre><p>Check <strong>Enforce Base URL</strong> → Save.</p><h3>Test</h3><pre># UI should load<br>curl -I https://registry.yourdomain.com</pre><pre># Registry API should return 401 (auth challenge — that means routing works)<br>curl -I <a href="https://registry.yourdomain.com/v2/">https://registry.yourdomain.com/v2/</a></pre><pre># Login and push<br>docker login registry.yourdomain.com<br>docker tag nginx:alpine registry.yourdomain.com/myapp/nginx:alpine<br>docker push registry.yourdomain.com/myapp/nginx:alpine</pre><p>The /v2/ path hits private Nginx → port 8082. Everything else hits private Nginx → port 8081. The certificate never leaves NPM.</p><h3>How the full routing works</h3><pre>https://registry.yourdomain.com          → NPM (cert) → Nginx :80 → Nexus UI  :8081<br>https://registry.yourdomain.com/v2/...   → NPM (cert) → Nginx :80 → Nexus API :8082</pre><p>One domain, one cert, one NPM entry, one Nginx config — clean and easy to maintain.</p><h3>Part 6 — Push your first image</h3><p>Log in to your local registry:</p><pre>docker login localhost:8082<br># Username: admin<br># Password: your password</pre><p>Pull a test image, tag it for your registry, and push it:</p><pre>docker pull nginx:alpine<br>docker tag nginx:alpine localhost:8082/myapp/nginx:alpine<br>docker push localhost:8082/myapp/nginx:alpine</pre><p>A successful push looks like this:</p><pre>The push refers to repository [localhost:8082/myapp/nginx]<br>aee4e54b3865: Pushed<br>453da7dbc73e: Pushed<br>...<br>alpine: digest: sha256:abc123... size: 1234</pre><h3>Verify in the UI</h3><p>Open http://localhost:8081 → <strong>Browse</strong> (left sidebar cube icon) → <strong>docker-private</strong>.</p><p>You will see a tree view like:</p><pre>docker-private<br>└── myapp<br>    └── nginx<br>        └── alpine</pre><p>Click any tag to see the full image manifest, all layers, digest, and size — similar to Docker Hub’s image detail page.</p><h3>Part 7 — Set up role-based access control</h3><p>Never use the admin account in your CI/CD pipeline. Create a dedicated user with minimal permissions.</p><h3><strong>Create CI User and Role</strong></h3><p><strong>Create Local User</strong><br>Go to ⚙ <strong>Administration → Security → Users → Create local user</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1e53c6ff236f7d7ee650e4af6fb7dd37/href">https://medium.com/media/1e53c6ff236f7d7ee650e4af6fb7dd37/href</a></iframe><h3>Create Custom Role</h3><p>Go to ⚙ <strong>Administration → Security → Roles → Create Role</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c5ddc50bd29ade5ef9035aae1cfcd6a2/href">https://medium.com/media/c5ddc50bd29ade5ef9035aae1cfcd6a2/href</a></iframe><p><strong>Assign Role</strong><br>Assign the <strong>docker-push-pull </strong>role to <strong>ci-user</strong>.</p><p>Now ci-usercan only push and pull to the Docker registry — it cannot access any other part of Nexus.</p><h3>Summary</h3><p>What Where Web UI (login required) http://localhost:8081 Docker push / pull localhost:8082 Docker Hub proxy cache localhost:8083 Image data ~/nexus-registry/nexus-data Admin account admin CI/CD account ci-user (registry-only access)</p><p>You now have a fully functional private Docker registry running locally with a web UI, proper authentication, role-based access control, and a clear path to production.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e40aa5b55d08" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Essential Networking Concepts from a DevOps Perspective — Part 3]]></title>
            <link>https://medium.com/@kirankaithacode/essential-networking-concepts-from-a-devops-perspective-part-3-f1a57319d970?source=rss-6fe5e9cbb9b5------2</link>
            <guid isPermaLink="false">https://medium.com/p/f1a57319d970</guid>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[reverse-proxy]]></category>
            <category><![CDATA[vpn-service]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[load-balancing]]></category>
            <dc:creator><![CDATA[Kirankunjumon]]></dc:creator>
            <pubDate>Tue, 05 May 2026 04:33:40 GMT</pubDate>
            <atom:updated>2026-05-05T04:33:40.417Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yDLXAY4oFZS6wIGABzNGtQ.png" /></figure><p>Parts 1 and 2 gave you the mental model: layers, addressing, resolution. In this final part, we get into the <strong>operational machinery</strong> — the components you&#39;ll configure, tune, and debug throughout your DevOps career. By the end, you&#39;ll have a complete picture of how production networks are built and maintained.</p><h3>Ports — The Doors of Every Service</h3><p>If an IP address is a building, a <strong>port</strong> is a specific door. Every network service listens on a port number (0–65535), and every outbound connection uses a port number too.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8c00bb3ea095953e73ad88999cd06193/href">https://medium.com/media/8c00bb3ea095953e73ad88999cd06193/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d7343d530fb462227bac72468501f80c/href">https://medium.com/media/d7343d530fb462227bac72468501f80c/href</a></iframe><h3>Ephemeral Ports</h3><p>When your app makes an <em>outbound</em> connection (e.g., querying a database), the OS assigns a random <strong>ephemeral port</strong> as the source:</p><pre>Your App (port 54321)  ──────▶  PostgreSQL (port 5432)<br>          ↑<br>          Ephemeral port assigned by OS</pre><p>This matters for firewall rules: if you&#39;re blocking outbound traffic, you typically allow <strong>established</strong> connections (return traffic to ephemeral ports).</p><h3>Port Management Commands</h3><pre># See all listening ports and which process owns them<br>ss -tlnp<br>netstat -tlnp     # older alternative<br><br># Check if a specific port is open<br>ss -tlnp | grep :8080<br><br># Test if a remote port is reachable<br>nc -zv 10.0.1.45 5432<br>telnet 10.0.1.45 5432<br><br># See all open connections<br>ss -anp<br><br># Find what&#39;s using port 80<br>lsof -i :80<br>fuser 80/tcp</pre><h3>Firewalls — Traffic Control at Scale</h3><p>A <strong>firewall</strong> is a gatekeeper that inspects network traffic and allows or blocks it based on rules. It&#39;s the primary security boundary in any network.</p><h3>Types of Firewalls</h3><p><strong>Packet Filter (Stateless):</strong> Examines each packet in isolation — source IP, destination IP, port, protocol. Fast but limited. Doesn&#39;t understand connection state.</p><p><strong>Stateful Firewall:</strong> Tracks connection state (SYN, ESTABLISHED, CLOSE_WAIT). Allows return traffic automatically. Far more practical and common.</p><p><strong>Application Firewall (WAF):</strong> Understands Layer 7 (HTTP). Can block SQL injection, XSS, specific URL patterns. AWS WAF, Cloudflare WAF, ModSecurity.</p><h3>iptables — The Linux Firewall Engine</h3><p>iptables is the backbone of firewalling on Linux. Even if you use ufw, firewalld, or cloud security groups, they often use iptables under the hood.</p><p><strong>Structure:</strong></p><pre>Tables → Chains → Rules<br><br>Table: filter (most common), nat, mangle, raw<br>Chains: INPUT (incoming), OUTPUT (outgoing), FORWARD (routed traffic)<br>Rules: Match criteria + Target (ACCEPT, DROP, REJECT, LOG)</pre><p><strong>Common iptables commands:</strong></p><pre># List all rules with line numbers<br>iptables -L -n -v --line-numbers<br><br># Allow incoming SSH<br>iptables -A INPUT -p tcp --dport 22 -j ACCEPT<br><br># Allow incoming HTTP and HTTPS<br>iptables -A INPUT -p tcp -m multiport --dports 80,443 -j ACCEPT<br><br># Allow established/related connections (return traffic)<br>iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT<br><br># Drop everything else<br>iptables -A INPUT -j DROP<br><br># Allow outbound, drop inbound by default (common server setup)<br>iptables -P INPUT DROP<br>iptables -P FORWARD DROP<br>iptables -P OUTPUT ACCEPT<br><br># NAT: Masquerade all traffic going out of eth0<br>iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE<br><br># Save rules (Ubuntu/Debian)<br>iptables-save &gt; /etc/iptables/rules.v4</pre><h3>nftables — The Modern Replacement</h3><p>nftables replaces iptables in modern Linux distributions (RHEL 8+, Debian 10+). Same concepts, cleaner syntax:</p><pre>nft list ruleset<br>nft add rule inet filter input tcp dport 22 accept</pre><h3>Cloud Security Groups</h3><p>In AWS, GCP, and Azure, <strong>Security Groups</strong> (AWS) / <strong>Firewall Rules</strong> (GCP) are stateful firewalls managed by the cloud control plane:</p><pre>AWS Security Group (Inbound Rules):<br>┌──────────────┬──────────┬───────────┬─────────────────────┐<br>│ Type         │ Protocol │ Port      │ Source              │<br>├──────────────┼──────────┼───────────┼─────────────────────┤<br>│ SSH          │ TCP      │ 22        │ 10.0.0.0/8 (VPN)   │<br>│ HTTP         │ TCP      │ 80        │ 0.0.0.0/0           │<br>│ HTTPS        │ TCP      │ 443       │ 0.0.0.0/0           │<br>│ PostgreSQL   │ TCP      │ 5432      │ sg-app-servers      │<br>└──────────────┴──────────┴───────────┴─────────────────────┘</pre><h3>Kubernetes Network Policies</h3><p>In Kubernetes, the equivalent is a <strong>NetworkPolicy</strong> — it controls which pods can talk to each other:</p><pre>apiVersion: networking.k8s.io/v1<br>kind: NetworkPolicy<br>metadata:<br>  name: db-only-from-app<br>spec:<br>  podSelector:<br>    matchLabels:<br>      role: database<br>  ingress:<br>  - from:<br>    - podSelector:<br>        matchLabels:<br>          role: app<br>    ports:<br>    - port: 5432</pre><p><strong>Important:</strong> NetworkPolicy requires a CNI that supports it (Calico, Cilium, Weave). The default CNI (kubenet) does not enforce NetworkPolicies.</p><h3>Load Balancing — Distributing Traffic at Scale</h3><p>A <strong>load balancer</strong> distributes incoming traffic across multiple backend servers, providing:</p><ul><li><strong>High availability</strong> — if one server dies, traffic routes to healthy ones</li><li><strong>Horizontal scalability</strong> — add servers to handle more load</li><li><strong>Zero-downtime deployments</strong> — drain traffic before taking servers offline</li></ul><h3>Layer 4 vs Layer 7 Load Balancing</h3><p><strong>Layer 4 (Transport Layer)</strong></p><ul><li>Works with TCP/UDP streams</li><li>Doesn&#39;t inspect content — just routes based on IP and port</li><li>Extremely fast (minimal overhead)</li><li>Can&#39;t make routing decisions based on URLs or headers</li></ul><pre>Client → L4 LB :443 → Backend Server 1 :443<br>                    → Backend Server 2 :443<br>                    → Backend Server 3 :443</pre><p><strong>Layer 7 (Application Layer)</strong></p><ul><li>Understands HTTP — inspects headers, URLs, cookies, body</li><li>Can route /api/* to API servers and /static/* to CDN</li><li>Can do SSL termination, add headers, rewrite URLs</li><li>Slightly more CPU overhead</li></ul><pre>Client → L7 LB :443<br>              │<br>              ├── /api/*        → API Pods<br>              ├── /auth/*       → Auth Service<br>              ├── /static/*     → CDN / Object Storage<br>              └── /admin/*      → Admin Service (internal only)</pre><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c39019cb8cee1b4d517282b16c121a1d/href">https://medium.com/media/c39019cb8cee1b4d517282b16c121a1d/href</a></iframe><h3>Health Checks</h3><p>Load balancers must know if a backend is healthy:</p><pre># Example: AWS Target Group Health Check<br>Protocol: HTTP<br>Path: /health<br>Port: 8080<br>Healthy threshold: 2 consecutive successes<br>Unhealthy threshold: 3 consecutive failures<br>Timeout: 5 seconds<br>Interval: 30 seconds<br>Success codes: 200</pre><p>Your application <strong>must implement a health check endpoint</strong>:</p><pre>@app.get(&quot;/health&quot;)<br>def health():<br>    # Check DB connection, cache, etc.<br>    return {&quot;status&quot;: &quot;ok&quot;}</pre><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/57b9483e61c06cd4060a6090d0e5bea6/href">https://medium.com/media/57b9483e61c06cd4060a6090d0e5bea6/href</a></iframe><h3>Proxies and Reverse Proxies</h3><p>These two get confused constantly. Let&#39;s fix that once and for all.</p><h3>Forward Proxy</h3><p>A <strong>forward proxy</strong> sits <strong>in front of clients</strong> and forwards their requests to the internet <em>on their behalf</em>. The destination server sees the proxy&#39;s IP, not the client&#39;s.</p><pre>Client → [Forward Proxy] → Internet</pre><p><strong>Use cases:</strong></p><ul><li>Corporate environments filtering/monitoring outbound web traffic</li><li>Bypassing geo-restrictions</li><li>Caching frequently accessed content</li><li>Anonymizing client traffic</li></ul><p>Tools: Squid, Privoxy, corporate web gateways</p><h3>Reverse Proxy</h3><p>A <strong>reverse proxy</strong> sits <strong>in front of servers</strong> and receives requests <em>on their behalf</em>. The client sees only the proxy&#39;s IP, not the backend servers.</p><pre>Internet → [Reverse Proxy] → Backend Server(s)</pre><p><strong>Use cases:</strong></p><ul><li>SSL/TLS termination (proxy handles HTTPS, backends use plain HTTP)</li><li>Load balancing across multiple backends</li><li>Caching and static asset serving</li><li>Request routing and rewriting</li><li>Protection/hiding of backend infrastructure</li><li>Compression and rate limiting</li></ul><p><strong>This is what Nginx, HAProxy, Envoy, and Traefik all are in typical production use.</strong></p><h3>Nginx as a Reverse Proxy — Config Anatomy</h3><pre># nginx.conf<br>upstream backend_pool {<br>    least_conn;                        # Load balancing algorithm<br>    server app1.internal:8080;<br>    server app2.internal:8080;<br>    server app3.internal:8080;<br>    keepalive 32;                      # Keep connections alive to backends<br>}<br><br>server {<br>    listen 80;<br>    server_name api.example.com;<br>    return 301 https://$host$request_uri;  # Redirect HTTP → HTTPS<br>}<br><br>server {<br>    listen 443 ssl;<br>    server_name api.example.com;<br><br>    # SSL Termination<br>    ssl_certificate     /etc/ssl/certs/api.example.com.crt;<br>    ssl_certificate_key /etc/ssl/private/api.example.com.key;<br>    ssl_protocols       TLSv1.2 TLSv1.3;<br><br>    # Security headers<br>    add_header X-Frame-Options DENY;<br>    add_header X-Content-Type-Options nosniff;<br>    add_header Strict-Transport-Security &quot;max-age=31536000&quot;;<br><br>    # Rate limiting<br>    limit_req zone=api_limit burst=20 nodelay;<br><br>    location /api/ {<br>        proxy_pass http://backend_pool;<br>        proxy_set_header Host $host;<br>        proxy_set_header X-Real-IP $remote_addr;<br>        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br>        proxy_connect_timeout 5s;<br>        proxy_read_timeout 60s;<br>    }<br><br>    location /static/ {<br>        root /var/www;<br>        expires 1y;<br>        add_header Cache-Control &quot;public, immutable&quot;;<br>    }<br>}</pre><h3>Service Mesh — The Next Level of Proxying</h3><p>In microservices, a <strong>service mesh</strong> (Istio, Linkerd, Consul Connect) deploys a <strong>sidecar proxy</strong> (usually Envoy) alongside every pod. This gives you:</p><ul><li><strong>mTLS</strong> between all services automatically</li><li><strong>Observability</strong> (distributed tracing, metrics) without app changes</li><li><strong>Traffic management</strong> (canary deployments, circuit breaking)</li><li><strong>Policy enforcement</strong> at the network level</li></ul><pre>Pod A:              Pod B:<br>[App] ←→ [Envoy]  ←mTLS→  [Envoy] ←→ [App]<br>         sidecar              sidecar</pre><h3>SSL/TLS — Encrypting Everything in Transit</h3><p><strong>TLS (Transport Layer Security)</strong> is the protocol that makes HTTPS work. It provides:</p><ul><li><strong>Encryption</strong> — data in transit is unreadable to interceptors</li><li><strong>Authentication</strong> — certificates prove server identity</li><li><strong>Integrity</strong> — data can’t be tampered with in transit</li></ul><h3>The TLS Handshake (Simplified)</h3><pre>Client                          Server<br>  │                               │<br>  │──── ClientHello ─────────────▶│  TLS version, cipher suites<br>  │                               │<br>  │◀─── ServerHello ──────────────│  Chosen cipher, certificate<br>  │                               │<br>  │  (Verify certificate)         │<br>  │                               │<br>  │──── Key Exchange ────────────▶│  Agree on session key<br>  │                               │<br>  │◀─── Finished ─────────────────│<br>  │──── Finished ────────────────▶│<br>  │                               │<br>  │═══ Encrypted Application Data ════│</pre><h3>SSL Termination vs SSL Passthrough vs mTLS</h3><p><strong>SSL Termination:</strong> The load balancer/proxy decrypts TLS, then forwards plain HTTP to backends. Backends don’t need certs. Traffic between proxy and backend is unencrypted (rely on private network security).</p><p><strong>SSL Passthrough:</strong> The load balancer doesn’t decrypt. TLS goes all the way to the backend. More secure, but LB can’t inspect content.</p><p><strong>mTLS (Mutual TLS):</strong> Both client AND server present certificates. Used in service meshes for service-to-service authentication.</p><h3>Certificate Management</h3><pre># Check a certificate&#39;s details<br>openssl x509 -in cert.pem -text -noout<br><br># Check certificate expiry<br>openssl x509 -in cert.pem -noout -enddate<br><br># Check what certificate a server is presenting<br>echo | openssl s_client -connect api.example.com:443 2&gt;/dev/null | openssl x509 -noout -dates<br><br># Test TLS configuration<br>curl -vI https://api.example.com</pre><p><strong>cert-manager</strong> in Kubernetes automates certificate issuance and renewal from Let’s Encrypt:</p><pre>apiVersion: cert-manager.io/v1<br>kind: Certificate<br>metadata:<br>  name: api-tls<br>spec:<br>  secretName: api-tls-secret<br>  issuerRef:<br>    name: letsencrypt-prod<br>  dnsNames:<br>  - api.example.com</pre><h3>VPNs and Tunneling</h3><h3>VPN — Virtual Private Network</h3><p>A VPN creates an <strong>encrypted tunnel</strong> over the public internet, making remote networks appear local.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e814230f74b4d3b14058f6b5d91f7baa/href">https://medium.com/media/e814230f74b4d3b14058f6b5d91f7baa/href</a></iframe><h3>SSH Tunneling</h3><p>SSH can create tunnels for any TCP traffic — incredibly useful for DevOps:</p><pre># Local port forwarding: access remote DB locally<br># Access remote PostgreSQL (port 5432) as localhost:5433<br>ssh -L 5433:db.internal:5432 bastion.example.com<br><br># Now connect your local DB client to localhost:5433<br><br># Remote port forwarding: expose local port on remote server<br>ssh -R 8080:localhost:3000 server.example.com<br># Traffic to server.example.com:8080 → your local machine:3000<br><br># Dynamic forwarding: SOCKS proxy through SSH<br>ssh -D 1080 bastion.example.com<br># Use localhost:1080 as a SOCKS proxy for browsing</pre><h3>Network Monitoring and Debugging Tools</h3><p>These are the tools you’ll reach for when production is on fire.</p><h3>tcpdump — Packet Capture</h3><pre># Capture all traffic on eth0<br>tcpdump -i eth0<br><br># Capture traffic to/from specific host<br>tcpdump -i eth0 host 10.0.1.45<br><br># Capture traffic on port 443<br>tcpdump -i eth0 port 443<br><br># Capture and save to file (open in Wireshark)<br>tcpdump -i eth0 -w capture.pcap<br><br># Show packet contents in ASCII<br>tcpdump -i eth0 -A port 80<br><br># Capture DNS queries<br>tcpdump -i eth0 port 53</pre><h3>ss and netstat</h3><pre># Active listening ports<br>ss -tlnp<br><br># All connections with process info<br>ss -anp<br><br># Connected TCP connections<br>ss -tnp state established<br><br># Show socket statistics<br>ss -s</pre><p>curl for API Debugging</p><pre># Verbose output (headers, TLS, timing)<br>curl -v https://api.example.com/health<br><br># Show timing breakdown<br>curl -w &quot;\n<br>DNS: %{time_namelookup}s<br>Connect: %{time_connect}s<br>TLS: %{time_appconnect}s<br>TTFB: %{time_starttransfer}s<br>Total: %{time_total}s\n&quot; -o /dev/null -s https://api.example.com<br><br># Follow redirects<br>curl -L https://api.example.com<br><br># Skip TLS verification (debugging only!)<br>curl -k https://api.example.com<br><br># Custom headers<br>curl -H &quot;Authorization: Bearer token&quot; https://api.example.com/users</pre><h3>mtr — Modern Traceroute</h3><p>mtr combines ping and traceroute into a live-updating view:</p><pre>mtr github.com<br># Shows each hop, packet loss %, latency in real-time</pre><h3>CDN — Content Delivery Networks</h3><p>A <strong>CDN</strong> is a globally distributed network of edge servers that cache and serve content from locations close to users.</p><pre>User in Mumbai ──▶ CDN Edge (Mumbai) ──▶ [HIT] Serve cached content<br>                                     └──▶ [MISS] Fetch from origin, cache, serve<br><br>User in Berlin  ──▶ CDN Edge (Frankfurt) ──▶ Serve cached content</pre><p><strong>What CDNs do for DevOps:</strong></p><ul><li>Dramatically reduce latency for global users</li><li>Absorb DDoS attacks before they reach your origin</li><li>SSL termination at the edge</li><li>Cache static assets (JS, CSS, images, videos)</li><li>Some do dynamic acceleration too (Cloudflare, Fastly)</li></ul><p><strong>Popular CDNs:</strong> Cloudflare, AWS CloudFront, GCP Cloud CDN, Fastly, Akamai</p><p><strong>Cache control headers you need to know:</strong></p><pre>Cache-Control: public, max-age=31536000, immutable   # Static assets (1 year)<br>Cache-Control: no-cache                               # Always revalidate<br>Cache-Control: no-store                               # Never cache (sensitive data)<br>Cache-Control: private, max-age=3600                  # User-specific, 1 hour</pre><h3>Network Troubleshooting Playbook</h3><p>When something’s broken in production, here’s a systematic approach:</p><h3>The Checklist</h3><pre>□ 1. Is the host reachable?<br>      ping 10.0.1.45<br>      → Timeout: routing issue, host down, ICMP blocked<br><br>□ 2. Is the port open?<br>      nc -zv 10.0.1.45 8080<br>      → Connection refused: service not running or wrong port<br>      → Timeout: firewall blocking<br><br>□ 3. Is the service responding correctly?<br>      curl -v http://10.0.1.45:8080/health<br>      → 5xx: application error<br>      → 4xx: application running, wrong request<br>      → No response: app crashed or hung<br><br>□ 4. Is DNS working?<br>      dig api.example.com<br>      nslookup api.example.com<br>      → Wrong IP: DNS misconfiguration, stale cache<br>      → No answer: DNS server unreachable<br><br>□ 5. Is TLS working?<br>      openssl s_client -connect api.example.com:443<br>      → Certificate errors: expired cert, wrong CN, chain issue<br><br>□ 6. Is there packet loss?<br>      mtr api.example.com<br>      → Loss at specific hop: network equipment issue<br><br>□ 7. Capture traffic if still stuck<br>      tcpdump -i eth0 host 10.0.1.45 -w debug.pcap<br>      → Analyse in Wireshark</pre><h3>The Complete DevOps Networking Mental Model</h3><p>Here’s how everything we’ve covered fits together in a typical production request:</p><pre>User&#39;s Browser<br>    │ DNS query: api.example.com → 203.0.113.1<br>    │<br>    ▼<br>CDN Edge (Cloudflare/CloudFront)<br>    │ TLS termination, cache check, DDoS protection<br>    │<br>    ▼<br>Load Balancer (AWS ALB / Nginx)<br>    │ L7 routing, health checks, SSL termination<br>    │ Selects backend: Least Connections algorithm<br>    │<br>    ▼<br>Reverse Proxy Sidecar (Envoy in service mesh)<br>    │ mTLS, observability, circuit breaking<br>    │<br>    ▼<br>Application Pod (Kubernetes)<br>    │ Port 8080, security group allows only from LB<br>    │<br>    ├──▶ Database (via DNS: postgres.db.svc.cluster.local)<br>    │         Firewall: only port 5432 from app pods<br>    │<br>    └──▶ Cache Redis (via DNS: redis.cache.svc.cluster.local)<br>              Firewall: only port 6379 from app pods</pre><p>Every arrow in that diagram is a network call. Every box is a concept we’ve covered.</p><h3>Summary — The Full Series at a Glance</h3><p><strong>Part 1 (Foundations):</strong></p><ul><li>OSI 7-layer model and TCP/IP 4-layer model</li><li>TCP vs UDP (reliability, handshakes, use cases)</li><li>ICMP, ping, traceroute</li><li>Encapsulation and de-encapsulation</li></ul><p><strong>Part 2 (Addressing):</strong></p><ul><li>IPv4 / IPv6 addressing and CIDR notation</li><li>Public vs private IPs and subnetting</li><li>NAT (SNAT, DNAT)</li><li>DNS (records, resolution, TTL, Kubernetes CoreDNS)</li><li>DHCP (DORA process, static vs dynamic)</li><li>ARP, routing tables</li></ul><p><strong>Part 3 (Operations):</strong></p><ul><li>Port ranges and management</li><li>Firewalls (iptables, security groups, NetworkPolicy)</li><li>Load balancing (L4 vs L7, algorithms, health checks)</li><li>Forward proxy vs reverse proxy</li><li>SSL/TLS (handshake, termination, mTLS, cert-manager)</li><li>VPNs and SSH tunneling</li><li>CDNs and caching headers</li><li>Debugging toolbox (tcpdump, ss, curl, mtr, dig)</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f1a57319d970" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Essential Networking Concepts from a DevOps Perspective - Part 2]]></title>
            <link>https://medium.com/@kirankaithacode/essential-networking-concepts-from-a-devops-perspective-part-2-67a9892ef1ef?source=rss-6fe5e9cbb9b5------2</link>
            <guid isPermaLink="false">https://medium.com/p/67a9892ef1ef</guid>
            <category><![CDATA[arp-protocol]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[routing]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Kirankunjumon]]></dc:creator>
            <pubDate>Sun, 03 May 2026 16:21:49 GMT</pubDate>
            <atom:updated>2026-05-03T16:21:49.311Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yDLXAY4oFZS6wIGABzNGtQ.png" /></figure><p>In Part 1, we built the mental model of how networks are <em>structured</em>. Now we get into the nuts and bolts of how devices are <em>addressed</em>, how names are <em>resolved</em>, and how addresses are <em>assigned</em> — the stuff that&#39;s running silently under every deployment you&#39;ve ever done.</p><h3>IP Addressing — The Postal System of the Internet</h3><p>An <strong>IP address</strong> is a unique identifier assigned to every device on a network. Without it, packets have no idea where to go.</p><h3>IPv4 — The Classic</h3><p>IPv4 addresses are <strong>32-bit numbers</strong> written as four decimal octets separated by dots:</p><pre>192  .  168  .   1  .  100<br> │        │       │      │<br> └────────┴───────┴──────┘<br>      4 octets × 8 bits = 32 bits total<br>      Range per octet: 0–255</pre><p>This gives us roughly <strong>4.3 billion</strong> possible addresses — which ran out faster than anyone expected.</p><h3>IPv6 — The Future (Already Here)</h3><p>IPv6 uses <strong>128-bit addresses</strong>, written in hexadecimal:</p><pre>2001:0db8:85a3:0000:0000:8a2e:0370:7334</pre><p>This gives us <strong>340 undecillion</strong> addresses — enough for every grain of sand on Earth to have its own IP, several times over. In cloud-native environments, you&#39;ll see IPv6 increasingly used.</p><p>For most day-to-day DevOps work, IPv4 is still dominant, but dual-stack (IPv4 + IPv6) setups are common in modern Kubernetes clusters.</p><h3>Public vs Private IP Addresses</h3><p>Not all IP addresses are created equal. The internet uses a split system:</p><h3>Private IP Ranges (RFC 1918)</h3><p>These are reserved for <strong>internal networks</strong> and are <strong>not routable</strong> on the public internet:</p><pre>10.0.0.0    – 10.255.255.255    /8   (Class A — 16M addresses)<br>172.16.0.0  – 172.31.255.255   /12   (Class B — 1M addresses)<br>192.168.0.0 – 192.168.255.255  /16   (Class C — 65K addresses)</pre><p><strong>You&#39;ll see these everywhere in DevOps:</strong></p><ul><li>192.168.x.x — Your local home/office network</li><li>10.x.x.x — Kubernetes Pod CIDR, VPC internal addresses (AWS, GCP, Azure)</li><li>172.16.x.x — Default Docker bridge network (172.17.0.0/16)</li></ul><h3>Public IP Addresses</h3><p>Everything outside the private ranges. Assigned by ISPs and cloud providers. Your EC2 instance&#39;s Elastic IP, your load balancer&#39;s external IP — these are public.</p><h3>Special Addresses to Know</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/48307c4307a5bf26659de99d885dd982/href">https://medium.com/media/48307c4307a5bf26659de99d885dd982/href</a></iframe><h3>Subnetting and CIDR Notation</h3><p><strong>Subnetting</strong> is dividing a large network into smaller, manageable sub-networks. It&#39;s how cloud VPCs are designed, how Kubernetes assigns pod IPs, and how you isolate services.</p><h3>CIDR Notation</h3><p>CIDR (Classless Inter-Domain Routing) notation looks like:</p><pre>192.168.1.0/24<br>           ↑<br>           Prefix length — how many bits are the &quot;network&quot; part</pre><p>The prefix length tells you:</p><ul><li>How many IP addresses are in the subnet</li><li>What the <strong>network address</strong> (first) and <strong>broadcast address</strong> (last) are</li><li>Which IPs are available for hosts</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e236d59b81d85c45b7d15c4471711a79/href">https://medium.com/media/e236d59b81d85c45b7d15c4471711a79/href</a></iframe><blockquote><strong><em>AWS Gotcha:</em></strong><em> AWS reserves 5 IPs in every subnet (network, VPC router, DNS, future use, broadcast). A </em><em>/28 subnet in AWS gives you only </em><strong><em>11</em></strong><em> usable IPs, not 14.</em></blockquote><h3>Quick Subnet Math</h3><p>For a /24 network like 10.0.1.0/24:</p><pre>Network address:   10.0.1.0    (first — not usable)<br>First host:        10.0.1.1<br>Last host:         10.0.1.254<br>Broadcast:         10.0.1.255  (last — not usable)<br>Usable hosts:      254</pre><h3>Real-World Example: AWS VPC Design</h3><pre>VPC: 10.0.0.0/16 (65,536 IPs)<br>│<br>├── Public Subnet:  10.0.1.0/24  (254 usable)  — Load balancers, NAT Gateways<br>├── Public Subnet:  10.0.2.0/24  (254 usable)  — Multi-AZ redundancy<br>│<br>├── Private Subnet: 10.0.10.0/24 (254 usable)  — App servers<br>├── Private Subnet: 10.0.11.0/24 (254 usable)  — App servers (AZ-2)<br>│<br>├── DB Subnet:      10.0.20.0/24 (254 usable)  — Databases (no internet)<br>└── DB Subnet:      10.0.21.0/24 (254 usable)  — Databases (AZ-2)</pre><h3>NAT — Network Address Translation</h3><p>Here&#39;s the magic that lets your entire office&#39;s 200 computers share a <em>single</em> public IP address:</p><p><strong>NAT (Network Address Translation)</strong> rewrites the source IP address of packets as they leave your private network, making them appear to come from the public IP of your router/gateway.</p><pre>Private Network              NAT Gateway              Internet<br>                                                      <br>10.0.1.50:54321  ──────▶  203.0.113.1:54321  ──────▶  api.github.com<br>                 Replaces private IP with public IP<br>                 <br>10.0.1.50:54321  ◀──────  203.0.113.1:54321  ◀──────  api.github.com<br>                 NAT table maps response back to correct internal host</pre><h3>Types of NAT in DevOps</h3><p><strong>SNAT (Source NAT):</strong> Outbound traffic from private → internet. Used in AWS NAT Gateways, on-prem routers.</p><p><strong>DNAT (Destination NAT):</strong> Inward port forwarding. Used in Docker port publishing (-p 8080:80) and Kubernetes NodePort services.</p><pre># Docker does DNAT under the hood when you run:<br>docker run -p 8080:80 nginx<br># External request to :8080 → DNAT → container port 80</pre><h3>DNS — The Internet&#39;s Phone Book</h3><p><strong>DNS (Domain Name System)</strong> translates human-readable names like api.myapp.com into IP addresses like 10.0.1.45. Without DNS, you&#39;d memorize IPs for everything.</p><h3>How a DNS Query Works</h3><pre>You type: www.github.com<br><br>1. Check browser cache → not found<br>2. Check OS cache (/etc/hosts) → not found<br>3. Ask Recursive Resolver (your ISP or 8.8.8.8)<br>   │<br>   ├── Ask Root Nameserver → &quot;I don&#39;t know, ask .com TLD&quot;<br>   ├── Ask .com TLD Server → &quot;I don&#39;t know, ask github.com NS&quot;<br>   └── Ask github.com Nameserver → &quot;www is at 140.82.114.4&quot;<br>   <br>4. Resolver returns 140.82.114.4 to your browser<br>5. Result cached with TTL (Time To Live)</pre><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/264600ae02680d103bbdbbda3c56facb/href">https://medium.com/media/264600ae02680d103bbdbbda3c56facb/href</a></iframe><h3>DNS in Kubernetes — Service Discovery</h3><p>Kubernetes has its own internal DNS (CoreDNS) that assigns DNS names to every Service automatically:</p><pre>&lt;service-name&gt;.&lt;namespace&gt;.svc.cluster.local<br><br># Examples:<br>postgres.database.svc.cluster.local<br>redis.cache.svc.cluster.local<br>payment-api.production.svc.cluster.local</pre><p>Your pods use these names to reach each other — zero hardcoded IPs.</p><h3>Useful DNS Tools</h3><pre># Query DNS for a domain<br>nslookup github.com<br>dig github.com<br><br># Detailed trace of DNS resolution<br>dig +trace github.com<br><br># Query a specific record type<br>dig github.com MX<br>dig github.com TXT<br><br># Reverse lookup (IP → hostname)<br>dig -x 140.82.114.4<br><br># Query a specific DNS server<br>dig @8.8.8.8 github.com<br><br># Check /etc/hosts first (local overrides)<br>cat /etc/hosts</pre><h3>DNS TTL — Why Deploys Sometimes Take Forever</h3><p>Every DNS record has a <strong>TTL (Time To Live)</strong> — how long resolvers cache it (in seconds).</p><pre>api.example.com.  300  IN  A  10.0.1.45<br>                  ↑<br>                  TTL: 300 seconds (5 minutes)</pre><p><strong>Pro tip:</strong> Before a DNS migration, lower TTL to 60 seconds a day before. After the switch, raise it back to 3600+. This minimizes downtime if you need to roll back.</p><h3>DHCP — Automatic Address Assignment</h3><p><strong>DHCP (Dynamic Host Configuration Protocol)</strong> automatically assigns IP addresses to devices when they join a network. Without it, every device would need manual IP configuration.</p><h3>The DHCP Dance (DORA)</h3><pre>Client              DHCP Server<br>  │                      │<br>  │──-─ DISCOVER ───────▶│  &quot;Is anyone out there? I need an IP!&quot;<br>  │                      │<br>  │◀─── OFFER ───────────│  &quot;I&#39;ll give you 192.168.1.105&quot;<br>  │                      │<br>  │──── REQUEST ────────▶│  &quot;I&#39;ll take 192.168.1.105 please&quot;<br>  │                      │<br>  │◀─── ACK ─────────────│  &quot;It&#39;s yours! Lease: 24 hours&quot;<br>  │                      │</pre><p><strong>DHCP gives you more than just an IP:</strong></p><ul><li>IP address + subnet mask</li><li>Default gateway</li><li>DNS server addresses</li><li>Lease duration (how long the IP is yours)</li><li>Domain name</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c7a97644606c8b5fdd15dca28320e064/href">https://medium.com/media/c7a97644606c8b5fdd15dca28320e064/href</a></iframe><p><strong>In cloud environments (EC2, GCP VMs):</strong> Your instance gets its IP via DHCP from the cloud provider’s DHCP server — but it’s always the same IP (effectively reserved). That’s why it persists across reboots.</p><p><strong>In Kubernetes:</strong> Pods get IPs from the CNI (Container Network Interface) plugin — which behaves like an internal DHCP-like allocator using IPAM (IP Address Management).</p><h3>ARP — Connecting IP to MAC</h3><p>Here’s a gap that confuses many: IP addresses work at Layer 3, but to actually <em>deliver</em> a packet on a local network, you need the <strong>MAC address</strong> (Layer 2). This is where <strong>ARP (Address Resolution Protocol)</strong> comes in.</p><pre>&quot;I need to send a packet to 192.168.1.105. What&#39;s its MAC address?&quot;<br><br>ARP Broadcast: &quot;WHO HAS 192.168.1.105? TELL 192.168.1.1&quot;<br>ARP Reply:     &quot;192.168.1.105 is at AA:BB:CC:DD:EE:FF&quot;<br></pre><p>The result is cached in the <strong>ARP table</strong>:</p><pre>arp -a<br># 192.168.1.1 (gateway)  at aa:bb:cc:11:22:33<br># 192.168.1.105          at dd:ee:ff:44:55:66</pre><p>This matters in debugging: <strong>ARP poisoning</strong> is a real attack vector in networks, and understanding ARP helps you interpret packet captures in tools like Wireshark or tcpdump.</p><h3>Routing — How Packets Find Their Way</h3><p>When a packet needs to leave your local network, your device consults a <strong>routing table</strong> to decide where to send it.</p><pre>ip route show<br># default via 192.168.1.1 dev eth0   ← All unknown destinations → gateway<br># 10.0.0.0/8 via 10.10.0.1 dev vpn0 ← VPN routes for internal network<br># 192.168.1.0/24 dev eth0            ← Local network, deliver directly</pre><p><strong>The logic:</strong></p><ol><li>Does the destination match a specific route? Use it.</li><li>If not, use the <strong>default route</strong> (the gateway/router).</li></ol><h3>Routing in Cloud Environments</h3><p>In AWS VPCs, GCP VPCs, and Kubernetes, routing tables are managed automatically, but you need to understand them to debug:</p><pre># Kubernetes — check pod routing<br>kubectl exec -it my-pod -- ip route<br><br># EC2 — check route table in AWS Console<br># Look for: Destination 0.0.0.0/0 → Target: igw-xxx (Internet Gateway)<br>#           Destination 10.0.0.0/8 → Target: tgw-xxx (Transit Gateway)</pre><h3>Bringing It All Together — What Happens When You curl an API</h3><p>Let’s trace a single curl https://api.example.com/users from a DevOps perspective:</p><pre>1. DNS Resolution<br>   curl asks OS: &quot;What&#39;s the IP of api.example.com?&quot;<br>   OS checks /etc/hosts → not found<br>   OS queries DNS server (e.g., 8.8.8.8) → returns 203.0.113.50<br><br>2. Routing<br>   OS checks routing table: &quot;How do I reach 203.0.113.50?&quot;<br>   → Default route via 192.168.1.1 (your gateway)<br><br>3. ARP (if needed)<br>   &quot;What&#39;s the MAC of 192.168.1.1?&quot;<br>   ARP lookup → gateway MAC found<br><br>4. TCP Handshake (Layer 4)<br>   SYN → SYN-ACK → ACK with 203.0.113.50:443<br><br>5. TLS Handshake (Layer 6)<br>   Certificate exchange, cipher negotiation<br><br>6. HTTP Request (Layer 7)<br>   GET /users HTTP/1.1<br>   Host: api.example.com<br><br>7. Response flows back<br>   Through every layer in reverse</pre><p>This single command touches every concept in this article.</p><h3>Summary — What You’ve Learned in Part 2</h3><ul><li><strong>IPv4</strong> uses 32-bit addresses; <strong>CIDR notation</strong> defines subnets</li><li><strong>Private IP ranges</strong> are for internal use; <strong>NAT</strong> connects them to the internet</li><li><strong>DNS</strong> resolves names to IPs; know your record types (A, CNAME, MX, TXT, SRV)</li><li><strong>DHCP</strong> automatically assigns IP configuration to devices</li><li><strong>ARP</strong> bridges the gap between IP addresses and MAC addresses</li><li><strong>Routing tables</strong> determine the path every packet takes</li><li>All of these work together every time any of your services makes a network call</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=67a9892ef1ef" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Essential Networking Concepts from a DevOps Perspective - Part 1]]></title>
            <link>https://medium.com/@kirankaithacode/essential-networking-concepts-from-a-devops-perspective-part-1-a14d696d2d05?source=rss-6fe5e9cbb9b5------2</link>
            <guid isPermaLink="false">https://medium.com/p/a14d696d2d05</guid>
            <category><![CDATA[troubleshooting]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[devsecops]]></category>
            <category><![CDATA[networking]]></category>
            <dc:creator><![CDATA[Kirankunjumon]]></dc:creator>
            <pubDate>Sun, 03 May 2026 10:46:13 GMT</pubDate>
            <atom:updated>2026-05-03T10:46:13.948Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yDLXAY4oFZS6wIGABzNGtQ.png" /></figure><h3>Why Should a DevOps Engineer Care About Networking?</h3><p>Before we dive in, let’s be honest about why this matters <em>specifically</em> for you:</p><ul><li>Your CI/CD pipelines pull packages over the network</li><li>Your microservices talk to each other over the network</li><li>Your load balancers, service meshes, and API gateways are all network constructs</li><li>When production breaks at 2 AM, the error is almost always connection refused, timeout, or no route to host</li></ul><p>Understanding networking turns you from someone who <em>guesses</em> at fixes to someone who <em>knows</em> exactly what’s wrong.</p><h3>The OSI Model — The 7-Layer Cake You Need to Know</h3><p>The <strong>OSI (Open Systems Interconnection)</strong> model is a conceptual framework that describes how data travels from one application to another across a network. Think of it as a <strong>translation guide</strong> — each layer has a specific job, and it hands off work to the layer above or below it.</p><pre>┌─────────────────────────────────────┐<br>│  Layer 7 — Application              │  HTTP, FTP, DNS, SMTP<br>├─────────────────────────────────────┤<br>│  Layer 6 — Presentation             │  TLS/SSL, Encoding, Compression<br>├─────────────────────────────────────┤<br>│  Layer 5 — Session                  │  Session management, Authentication<br>├─────────────────────────────────────┤<br>│  Layer 4 — Transport                │  TCP, UDP — Ports live here<br>├─────────────────────────────────────┤<br>│  Layer 3 — Network                  │  IP Addressing, Routing<br>├─────────────────────────────────────┤<br>│  Layer 2 — Data Link                │  MAC Addresses, Switches, Ethernet<br>├─────────────────────────────────────┤<br>│  Layer 1 — Physical                 │  Cables, Radio waves, Fiber<br>└─────────────────────────────────────┘</pre><h3>The Layers, Explained for DevOps</h3><p><strong>Layer 1 — Physical</strong> The actual hardware. Cables, Wi-Fi signals, fiber optics. You rarely deal with this directly, but knowing it exists helps. If your VM in the cloud can’t communicate, it’s almost never Layer 1 — but in on-prem environments, a bad cable is a very real thing.</p><p><strong>Layer 2 — Data Link</strong> This layer handles communication within the <em>same local network</em> using <strong>MAC addresses</strong> (hardware addresses burned into network cards). Switches operate here. When you’re inside a Docker network and containers talk to each other, this layer is involved.</p><p><strong>Layer 3 — Network</strong> This is where <strong>IP addresses</strong> live. Routers work at this layer. Data here is packaged into <strong>packets</strong> and routed between different networks. When your app reaches out to an external API, Layer 3 is doing the heavy lifting.</p><p><strong>Layer 4 — Transport</strong> Meet your two most important protocols: <strong>TCP</strong> and <strong>UDP</strong>. This layer handles <strong>ports</strong>, <strong>reliability</strong>, and <strong>flow control</strong>. Nearly everything in DevOps lives here or above.</p><p><strong>Layer 5 — Session</strong> Manages the lifecycle of a connection — opening, maintaining, and closing sessions. Less visible in day-to-day DevOps, but relevant in understanding persistent connections and WebSockets.</p><p><strong>Layer 6 — Presentation</strong> Data formatting, encryption, and compression. <strong>TLS/SSL</strong> lives here. When you enable HTTPS on your Nginx config, you’re engaging Layer 6.</p><p><strong>Layer 7 — Application</strong> The layer you interact with the most. <strong>HTTP, HTTPS, DNS, FTP, SMTP</strong> — these are all Layer 7 protocols. Your REST APIs live here. Your health check endpoints live here.</p><h3>The TCP/IP Model — The Real-World Simplification</h3><p>While OSI has 7 layers, the <strong>TCP/IP model</strong> (also called the Internet model) is what the real internet actually uses. It compresses OSI into 4 layers:</p><pre>┌──────────────────────────────────────┐<br>│  Application Layer                   │  = OSI Layers 5, 6, 7<br>│  (HTTP, DNS, FTP, SMTP)              │<br>├──────────────────────────────────────┤<br>│  Transport Layer                     │  = OSI Layer 4<br>│  (TCP, UDP)                          │<br>├──────────────────────────────────────┤<br>│  Internet Layer                      │  = OSI Layer 3<br>│  (IP, ICMP, ARP)                     │<br>├──────────────────────────────────────┤<br>│  Network Access Layer                │  = OSI Layers 1 &amp; 2<br>│  (Ethernet, Wi-Fi, MAC)              │<br>└──────────────────────────────────────┘</pre><p>TCP/IP is what you’ll see referenced in real documentation, cloud provider guides, and network debugging. OSI is the <em>teaching tool</em>; TCP/IP is the <em>working model</em>.</p><h3>TCP vs UDP — The Most Important Decision in Networking</h3><p>At Layer 4, you choose between two transport protocols. This choice determines how data is delivered.</p><h3>TCP — Transmission Control Protocol</h3><p>TCP is <strong>reliable, ordered, and error-checked</strong>. Before any data is sent, TCP performs a <strong>three-way handshake</strong>:</p><pre>Client              Server<br>  │                   │<br>  │──── SYN ─────────▶│   &quot;Hey, want to talk?&quot;<br>  │                   │<br>  │◀─── SYN-ACK ──────│   &quot;Sure, I&#39;m ready!&quot;<br>  │                   │<br>  │──── ACK ─────────▶│   &quot;Great, let&#39;s go.&quot;<br>  │                   │<br>  │═══ DATA FLOWS ════│</pre><ul><li>Guarantees packets arrive <strong>in order</strong></li><li>Retransmits <strong>lost packets</strong></li><li>Uses <strong>acknowledgements</strong> (ACKs)</li><li>Has <strong>congestion control</strong></li></ul><p><strong>When to expect TCP in DevOps:</strong></p><ul><li>HTTP/HTTPS web traffic</li><li>Database connections (PostgreSQL, MySQL)</li><li>SSH connections</li><li>Git over HTTPS or SSH</li></ul><h3>UDP — User Datagram Protocol</h3><p>UDP is <strong>fast but unreliable</strong>. It’s a “fire and forget” protocol — it sends packets with no guarantee they arrive.</p><ul><li><strong>No handshake</strong> — just start sending</li><li><strong>No retransmission</strong> — lost packets are gone</li><li><strong>No ordering guarantee</strong></li><li>Much <strong>lower overhead</strong></li></ul><p><strong>When to expect UDP in DevOps:</strong></p><ul><li>DNS queries (fast lookups)</li><li>Monitoring metrics (StatsD, some Prometheus exporters)</li><li>Log streaming</li><li>Video/audio streaming</li><li>VPNs (WireGuard uses UDP)</li></ul><h3>Quick Comparison</h3><p>Feature TCP UDP Connection Required (handshake) None Reliability Guaranteed delivery Best-effort Order In-order delivery No guarantee Speed Slower (overhead) Faster Use case HTTP, DB, SSH DNS, streaming, metrics</p><h3>How Data Actually Travels — Encapsulation</h3><p>Here’s something that clicks everything into place: when you send an HTTP request, each layer <strong>wraps</strong> the data with its own header. This is called <strong>encapsulation</strong>.</p><pre>┌─────────────────────────────────────────────────────┐<br>│  Application: HTTP Request (&quot;GET /api/users&quot;)        │<br>├──────────────┬──────────────────────────────────────┤<br>│  TCP Header  │  Application Data                    │  ← Segment<br>├──────┬───────┴──────────────────────────────────────┤<br>│  IP  │  TCP Header  │  Application Data             │  ← Packet<br>├──┬───┴──────────────────────────────────────────────┤<br>│Eth│  IP  │  TCP Header  │  Application Data   │ FCS │  ← Frame<br>└──┴──────────────────────────────────────────────────┘</pre><p>When the packet arrives, each layer <strong>unwraps</strong> its header (de-encapsulation) and hands the payload up to the next layer.</p><h3>ICMP — The Diagnostic Protocol</h3><p><strong>ICMP (Internet Control Message Protocol)</strong> isn’t for data transfer — it’s for <strong>network diagnostics</strong>. Two tools you’ll use constantly rely on it:</p><p><strong>ping</strong> — Tests if a host is reachable and measures round-trip time:</p><pre>ping google.com<br># PING google.com: 56 bytes, seq 0, ttl 116, time=12.4ms</pre><p><strong>traceroute</strong> (or tracert on Windows) — Shows every router hop between you and a destination:</p><pre>traceroute github.com<br># 1  192.168.1.1 (your router)   1.2ms<br># 2  10.0.0.1 (ISP gateway)      8.4ms<br># 3  ...</pre><blockquote><strong><em>DevOps Pro Tip:</em></strong><em> If </em><em>ping succeeds but your app can&#39;t connect, the issue is almost certainly at Layer 4 (port/firewall) or Layer 7 (application). This narrows your debugging immediately.</em></blockquote><h3>Practical Debugging Using the OSI Model</h3><p>When something breaks, think in layers — <strong>bottom up</strong>:</p><pre>1. Can I ping the host?          → Layer 3 (Network) working<br>2. Can I telnet/nc to the port?  → Layer 4 (Transport) working<br>3. Do I get an HTTP response?    → Layer 7 (Application) working<br>4. Is the content correct?       → Application logic issue</pre><p>Example debugging session:</p><pre># Step 1: Is the host reachable?<br>ping 10.0.1.45</pre><pre># Step 2: Is the port open?<br>nc -zv 10.0.1.45 5432      # Check PostgreSQL port</pre><pre># Step 3: Is the service responding?<br>curl -I <a href="http://10.0.1.45:8080/health">http://10.0.1.45:8080/health</a></pre><pre># Step 4: Trace the full path<br>traceroute 10.0.1.45</pre><h3>Key Protocols to Know (The DevOps Hit List)</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/26aa5c91ae363313c603dc497f58fb6f/href">https://medium.com/media/26aa5c91ae363313c603dc497f58fb6f/href</a></iframe><h3>Summary — What You’ve Learned in Part 1</h3><ul><li>The <strong>OSI model</strong> has 7 layers, each with a distinct responsibility</li><li>The <strong>TCP/IP model</strong> is the real-world 4-layer implementation</li><li><strong>TCP</strong> is reliable and ordered; <strong>UDP</strong> is fast and connectionless</li><li>Data is <strong>encapsulated</strong> as it moves down the stack and unwrapped going up</li><li><strong>ICMP</strong> powers ping and traceroute — essential debugging tools</li><li>When debugging, always <strong>start from Layer 1 and work up</strong></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a14d696d2d05" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>