<?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"><channel><title><![CDATA[DevOps with Ayush]]></title><description><![CDATA[A 20-day series breaking down real AWS VPC architecture patterns — Bastion Hosts, NAT Gateways, Multi-AZ, VPC Peering, and more — for DevOps and cloud engineers.]]></description><link>https://ayushtrivedi.hashnode.dev</link><image><url>https://cdn.hashnode.com/uploads/logos/683d3745586ee5a5815d8863/deff2386-09d4-4dc8-8984-4fc27b148bad.png</url><title>DevOps with Ayush</title><link>https://ayushtrivedi.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Wed, 09 Sep 2026 14:10:14 GMT</lastBuildDate><atom:link href="https://ayushtrivedi.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Day 2: NAT Gateway — Outbound Internet Access for Private Subnets]]></title><description><![CDATA[Private EC2 instances have no internet access by default. That’s fine for security, but it also means they can’t run yum update, install packages, or call an external API.
A NAT Gateway solves this by]]></description><link>https://ayushtrivedi.hashnode.dev/day-2-nat-gateway-outbound-internet-access-for-private-subnets</link><guid isPermaLink="true">https://ayushtrivedi.hashnode.dev/day-2-nat-gateway-outbound-internet-access-for-private-subnets</guid><dc:creator><![CDATA[Ayush Trivedi]]></dc:creator><pubDate>Thu, 13 Aug 2026 06:53:04 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/683d3745586ee5a5815d8863/7c6400f4-953f-46e8-8eb6-fbeced0066df.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Private EC2 instances have no internet access by default. That’s fine for security, but it also means they can’t run <code>yum update</code>, install packages, or call an external API.</p>
<p>A NAT Gateway solves this by providing outbound internet access without exposing the private instance directly to the internet.</p>
<h2><strong>What it does</strong></h2>
<p>A NAT Gateway sits in the public subnet. Private instances send their outbound requests to the NAT Gateway, which forwards the traffic to the internet and returns the responses to the originating instance. External systems cannot initiate unsolicited inbound connections through the NAT Gateway— only your instance can start one going out.</p>
<h2><strong>How to set it up</strong></h2>
<ol>
<li><p>Use a VPC with a public subnet and a private subnet.</p>
</li>
<li><p>Allocate an Elastic IP.</p>
</li>
<li><p>Create a NAT Gateway in the public subnet and attach the Elastic IP to it.</p>
</li>
<li><p>In the private subnet’s route table, add a route: <code>0.0.0.0/0</code> → NAT Gateway.</p>
</li>
<li><p>Test from the private instance with <code>curl</code> or your distribution's package manager, such as <code>dnf</code> or <code>yum</code>.</p>
</li>
</ol>
<h2><strong>Resources in this architecture</strong></h2>
<ul>
<li><p>1 VPC</p>
</li>
<li><p>Public subnet + private subnet</p>
</li>
<li><p>1 NAT Gateway</p>
</li>
<li><p>1 Internet Gateway</p>
</li>
<li><p>1 Elastic IP</p>
</li>
<li><p>2 route tables</p>
</li>
<li><p>EC2 in the private subnet</p>
</li>
</ul>
<h2><strong>Traffic flow</strong></h2>
<img src="https://cdn.hashnode.com/uploads/covers/683d3745586ee5a5815d8863/e641eaa5-7d24-4d43-a7a1-71494c91c57a.png" alt="" style="display:block;margin:0 auto" />

<p>Private EC2 → private route table → NAT Gateway → Internet Gateway → Internet.</p>
<h2><strong>A few things worth knowing</strong></h2>
<p>A NAT Gateway is a common AWS pattern for providing outbound internet access to resources in private subnets without exposing them directly to the internet.</p>
<p>It does cost money — an hourly rate plus a per-GB charge for data passing through it. For AWS services such as S3, a VPC endpoint can be more cost-effective than routing the traffic through a NAT Gateway.</p>
<p>Next: Day 3 — Multi-AZ High Availability VPC.</p>
]]></content:encoded></item><item><title><![CDATA[Day 1: A Beginner’s Guide to Jump Servers]]></title><description><![CDATA[A beginner’s guide to understanding jump servers before everyone tells you to skip them entirely  
Let me tell you a scenario.
You’ve just set up your first EC2 instance on AWS. It’s running your appl]]></description><link>https://ayushtrivedi.hashnode.dev/day-1-a-beginner-s-guide-to-jump-servers</link><guid isPermaLink="true">https://ayushtrivedi.hashnode.dev/day-1-a-beginner-s-guide-to-jump-servers</guid><dc:creator><![CDATA[Ayush Trivedi]]></dc:creator><pubDate>Wed, 12 Aug 2026 08:56:47 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/683d3745586ee5a5815d8863/3c0b4ac9-02d7-41a5-be4e-f6bb8e56da83.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>A beginner’s guide to understanding jump servers before everyone tells you to skip them entirely  </p>
<p>Let me tell you a scenario.</p>
<p>You’ve just set up your first EC2 instance on AWS. It’s running your application. You gave it a public IP because — So you can SSH into it. Then you set up a database on another EC2. Same thing. Public IP.</p>
<p>And now in similar way you’ve got five servers, all publicly reachable, all sitting there on the open internet with port 22 exposed, waiting.</p>
<p>That’s the moment a Bastion Host starts making a lot of sense.</p>
<h3>What Actually Is a Bastion Host?</h3>
<p>A Bastion Host — also called a Jump Server — is a single, hardened EC2 instance that sits in your public subnet and acts as the only SSH entry point into everything else. Your other servers live in a private subnet. No public IPs. Not visible to the internet at all. You want to get into them? You go through the Bastion. That’s it. That’s the whole idea.</p>
<p>The term “bastion” comes from military architecture. It’s the protruding part of a fortification specifically designed to defend the main walls. One strong point. Everything behind it is protected.</p>
<p>AWS brought this concept into the cloud era, and for years, it’s been a go-to solution for DevOps engineers. While modern tools are starting to change how we handle remote access, the bastion host remains a essential mental model for understanding secure networking.</p>
<img src="https://cdn.hashnode.com/uploads/covers/683d3745586ee5a5815d8863/16430d7d-a8d3-432d-9159-e616f395436e.png" alt="" style="display:block;margin:0 auto" />

<h3>How to Build One — For Real</h3>
<p>Here’s the actual sequence.</p>
<h3>Step 1: Create a VPC</h3>
<p>Create a VPC with a private CIDR block (e.g., 10.0.0.0/16). Your VPC is your private network in the cloud. Think of it as your own fenced piece of AWS real estate. Inside this VPC, you'll have to create two subnets.</p>
<h3>Step 2: Create a Public Subnet and a Private Subnet</h3>
<p>Public subnet: something like 10.0.1.0/24. This is where your Bastion lives.</p>
<p>Private subnet: something like 10.0.2.0/24. This is where your actual application or database servers live. Nothing here will ever be directly reachable from outside.</p>
<h3>Step 3: Attach an Internet Gateway</h3>
<p>Without this, nothing in your VPC can talk to the internet — not even your Bastion. Create an Internet Gateway (IGW) and attach it to your VPC.</p>
<p>Then update the public subnet’s route table to add a route: 0.0.0.0/0 → IGW. This tells AWS: "Any traffic heading out to the internet from this subnet? Send it through the gateway."</p>
<p>The private subnet’s route table gets no such route. That’s intentional. Private means private.</p>
<h3>Step 4: Launch the Bastion (EC2 #1)</h3>
<p>Put it in the public subnet. Enable auto-assign public IP. Use Amazon Linux 2 or Ubuntu — keep it minimal. No web server, no application, no extra packages. Less software means fewer vulnerabilities.</p>
<p>Security Group for the Bastion: allow SSH (port 22) from your IP only. Not 0.0.0.0/0. Not your office's entire range if you can help it. Your specific IP. Something like 203.0.113.42/32. Yes, this will break if your IP changes. That's a trade-off you accept for a tighter perimeter.</p>
<h3>Step 5: Launch the Private Server (EC2 #2)</h3>
<p>Put it in the private subnet. No public IP — uncheck that option. This machine gets a private IP only, like 10.0.2.15.</p>
<p>Security Group for the private server: allow SSH (port 22) from the Bastion’s security group ID only. This is neater than using the Bastion’s IP, because if you ever swap the Bastion instance, you don’t have to update this rule.</p>
<h3>Step 6: SSH In</h3>
<p>From your laptop:</p>
<ul>
<li>SSH into the Bastion</li>
</ul>
<p><code>ssh -i "my-key.pem" ec2-user@&lt;BASTION_PUBLIC_IP&gt;</code></p>
<ul>
<li>Then, SSH into the private instance</li>
</ul>
<p><code>ssh -i "my-key.pem" ec2-user@&lt;PRIVATE_INSTANCE_IP&gt;</code></p>
<p>You’re now on the private server. Two hops. That’s what “jump server” means.</p>
<p>One practical note: if you don’t want your private key sitting on the Bastion (you shouldn’t), look up SSH Agent Forwarding (ssh -A). It lets you authenticate to the private server using the key on your local machine, forwarded through the Bastion. Cleaner and more secure.</p>
<h3><strong>What You’ve Actually Built</strong></h3>
<img src="https://cdn.hashnode.com/uploads/covers/683d3745586ee5a5815d8863/78992ca2-912a-4015-92bb-4b8a11ae2743.png" alt="" style="display:block;margin:0 auto" />

<ul>
<li><p>1 VPC</p>
</li>
<li><p>1 Public Subnet + 1 Private Subnet</p>
</li>
<li><p>2 Route Tables (one with internet access, one without)</p>
</li>
<li><p>1 Internet Gateway</p>
</li>
<li><p>2 Security Groups (one strict, one stricter)</p>
</li>
<li><p>2 EC2 instances</p>
</li>
</ul>
<p>The traffic flow is simple:</p>
<img src="https://cdn.hashnode.com/uploads/covers/683d3745586ee5a5815d8863/b42da539-9a0e-4a72-8780-135cbc13f6a4.png" alt="" style="display:block;margin:0 auto" />

<p>That arrow between Your Laptop and the Bastion? It crosses the public internet. That arrow between the Bastion and the Private EC2? It never leaves your VPC. Completely internal.</p>
<h3><strong>Why This Matters Beyond the Lab</strong></h3>
<p>While the manual bastion host is a classic, it is not the only way to manage secure access today. Many organizations have migrated to <strong>AWS Systems Manager (SSM) Session Manager</strong>. This service allows you to connect to private instances directly through the AWS API.</p>
<p>Session Manager is generally preferred because:</p>
<ul>
<li><p><strong>No Inbound Ports:</strong> You do not need to open port 22 (SSH) in your security groups.</p>
</li>
<li><p><strong>No Key Management:</strong> You no longer need to manage and distribute SSH keys across your team.</p>
</li>
<li><p><strong>Granular Control:</strong> Access is managed through AWS IAM policies, allowing you to audit exactly who accessed which server and when.</p>
</li>
</ul>
<p>However, the manual process remains relevant. Building a bastion host manually forces you to confront the fundamentals: VPC segmentation, route table configurations, and security group chaining. These are not just “bastion tasks” — they are the core building blocks of cloud networking.</p>
<p>If you don’t understand how to manually secure a network, you won’t fully grasp the security posture that tools like Session Manager provide. Master the manual architecture first; it provides the mental model you will rely on for the rest of your career, regardless of which tools you choose to deploy.</p>
]]></content:encoded></item></channel></rss>