<?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 Danujaya Liyanage on Medium]]></title>
        <description><![CDATA[Stories by Danujaya Liyanage on Medium]]></description>
        <link>https://medium.com/@danujaya.sandeepa?source=rss-db8efdaa0b31------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Q3ZEylhazG_6dfEqZNLEyw.jpeg</url>
            <title>Stories by Danujaya Liyanage on Medium</title>
            <link>https://medium.com/@danujaya.sandeepa?source=rss-db8efdaa0b31------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 03:57:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@danujaya.sandeepa/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[Guardians of the Gate: Fortifying Cloud Infrastructure with a Bastion Host.]]></title>
            <link>https://medium.com/@danujaya.sandeepa/guardians-of-the-gate-fortifying-cloud-infrastructure-with-a-bastion-host-3bc9b891dde1?source=rss-db8efdaa0b31------2</link>
            <guid isPermaLink="false">https://medium.com/p/3bc9b891dde1</guid>
            <dc:creator><![CDATA[Danujaya Liyanage]]></dc:creator>
            <pubDate>Sun, 16 Mar 2025 05:31:48 GMT</pubDate>
            <atom:updated>2025-03-16T05:31:48.286Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*co1r3BZFuyUXVb0Ld_ySkA.png" /><figcaption>Generated with Leonardo.ai</figcaption></figure><p>Hi everyone, I’m Danujaya. Recently, while working on a project, I came across something called a “<strong>Bastion Host</strong>.” Honestly, the name itself sounded cool to me, like some kind of special armored guard protecting cloud infrastructure. But the more I dug in, the more fascinating (and surprisingly simple) it became. And since this is my very first blog post (wish me luck!), I thought I’d share my “aha!” moment with y’all, especially those of you exploring cloud, DevOps, and cloud-native technologies.</p><h3>A Kingdom Under Siege</h3><p>Imagine an ancient kingdom. A magnificent city filled with valuable resources. To protect it from invaders, the kingdom wouldn’t just have a big, wide-open gate, right? Instead, they’d build a fortified entrance, perhaps a narrow tunnel or a series of gates, carefully controlled by guards. This controlled access point allowed them to,</p><ul><li><strong>Identify Everyone Entering:</strong> Only authorized personnel (<em>knights, messengers, approved merchants</em>) could pass.</li><li><strong>Control access:</strong> They could decide <em>when</em> and <em>how</em> people entered.</li><li><strong>Defend More Easily:</strong> It’s much easier to defend a narrow passage than a wide open field.</li></ul><p>The idea was simple yet powerful: by controlling just one or a few entry points, the kingdom could keep out unwanted invaders while welcoming trusted allies. In the world of cloud security, this ‘chokepoint’ is similar to what’s known as a <strong>Bastion Host</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/298/1*VlTPoZwyuC31iMHlMdbnpA.png" /><figcaption>Drawing of a bastion in a castle (<a href="https://en.wikipedia.org/wiki/Bastion">Bastion — Wikipedia</a>)</figcaption></figure><h4>The “Aha!” Moment</h4><p>While working on a project that challenged my understanding of secure network architectures, I realized that directly exposing each server to the public internet was like leaving multiple doors open in a castle. I dove into research, and that’s when I discovered the <strong>Bastion Host</strong>, a concept that felt like the digital reincarnation of that ancient, fortified gate. This single point of controlled access was the key to securing the entire system.</p><h4><strong>What <em>Is</em> a Bastion Host, Technically Speaking?</strong></h4><p>In the cloud world, your servers are often placed inside <em>private networks</em>. This is a good thing! It isolates them from the public internet, making them much less vulnerable to direct attacks.</p><p>But... how do <em>you</em>, the developer, administrator, or DevOps engineer, access these servers to manage them, deploy updates, or troubleshoot issues?. You wouldn’t want to open up direct SSH or RDP access from the entire internet, would you? That’s like leaving the kingdom’s main gate wide open!.</p><p>This is where the bastion host comes in. It’s a specially configured server, typically located in a <em>public</em> <em>subnet,</em> that acts as a <em>single, tightly controlled point of entry</em> to your <em>private</em> network.</p><blockquote><em>“A bastion host is a special-purpose computer on a network specifically designed and configured to withstand attacks. The computer generally hosts a single application, for example, a proxy server, and all other services are removed or limited to reduce the threat to the computer.”</em> — From Wikipedia, citing Building Internet Firewalls, 2nd Edition.</blockquote><blockquote><em>“A system identified by the firewall administrator as a critical strong point in the network security. Generally, bastion hosts will have some degree of extra attention paid to their security, may undergo regular audits, and may have modified software.”</em> — From the RFC 2828 , Internet Security Glossary, Version 2</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XWNAOFFgJvhZ3sLZm0KqQQ.png" /><figcaption>Bastion Host Architecture: The diagram shows a VPC with public and private subnets. The Bastion host, residing in public subnet is the only entry point to servers residing in the private subnet.</figcaption></figure><h4><strong>Key Features of a Bastion Host</strong></h4><ol><li><strong>Hardened Security:</strong> A Bastion Host is like the most heavily armored knight at the gate. It’s built with security in mind, this means:</li></ol><ul><li><strong>Minimal Software:</strong> Only the absolutely necessary software is installed, reducing the attack surface.</li><li><strong>Strong Authentication:</strong> Various strategies like multi-factor authentication, strong passwords, and often, SSH key pairs instead of just passwords are used.</li><li><strong>Strict Firewall Rules:</strong> It only allows connections from very specific IP addresses or ranges.</li><li><strong>Regular Security Audits:</strong> Constant vigilance to ensure it remains secure.</li></ul><p><strong>2. Jump Box Functionality:</strong> You first connect to the Bastion Host, and <em>from there</em>, you “jump” to your internal servers. This is why it’s sometimes called a “<strong>jump box</strong>.”</p><p><strong>3. Auditing and Logging:</strong> Every connection and command executed through the bastion host is typically logged. This provides a clear audit trail, crucial for security and compliance.</p><p><strong>4. Single Point of Control</strong> The bastion provides a single point of audit and control. If you were to retire the bastion, no traffic could access the private network.</p><h4><strong>Why use a Bastion Host?</strong></h4><ul><li><strong>Reduced Attack Surface:</strong> Dramatically reduces the exposure of your internal servers to the internet.</li><li><strong>Centralized Access Control:</strong> Easier to manage and enforce security policies.</li><li><strong>Improved Auditability:</strong> Provides a clear record of who accessed what and when.</li><li><strong>Simplified Network Configuration:</strong> You don’t need to configure complex firewall rules for each individual server.</li></ul><h4><strong>Building Your Own Fortified Gate</strong></h4><p>While the specific steps vary depending on your cloud provider, the general process involves:</p><ol><li><strong>Creating a Virtual Machine:</strong> Choose a suitable instance type (usually a small, cost-effective one is sufficient).</li><li><strong>Placing it in a public subnet:</strong> Ensure it has a public IP address.</li><li><strong>Configuring Security Groups/Network ACLs:</strong> Restrict inbound traffic to only allow SSH (port 22) or RDP (port 3389) from your trusted IP addresses. Allow outbound traffic to your private subnet.</li><li><strong>Hardening the Operating System:</strong> Disable unnecessary services, install security updates, configure strong authentication.</li><li><strong>Setting Up SSH Key Pairs:</strong> Use key-based authentication instead of passwords for enhanced security.</li><li><strong>Enable logging and monitoring tools.</strong></li></ol><h4><strong>My Takeaway and Why You Should Care</strong></h4><p>Discovering Bastion Hosts was a real eye opener for me. It showed how a seemingly simple concept could drastically improve the security posture of a cloud environment. As someone passionate about cloud architecture and software engineering, understanding these foundational security principles is crucial.</p><p>If you’re building anything in the cloud, even a small project, take the time to learn about Bastion Hosts. It’s a relatively small investment of effort that yields significant security dividends. It’s like building that strong, fortified gate for your kingdom, a vital step in protecting your valuable digital assets.</p><h4><strong>Let’s Discuss!</strong></h4><p>Have you worked with Bastion Hosts before? Do you have any tips or tricks to share? Let’s connect in the comments below!, I’d love to learn from your experiences as I continue my journey into the cloud. And if you have suggestions for future blog topics related to cloud computing, DevOps, or software architecture, let me know!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3bc9b891dde1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>