π οΈ The Missing Link: Resolving VPC Routing and IGW Issues
Hey Cloud Builders π
Welcome to Day 40 of the #100DaysOfCloud Challenge!
Today, we are putting on our detective hats. The Nautilus team has an EC2 instance with Nginx installed and Security Groups properly configured, yet it's invisible to the internet. We are deep-diving into the VPC Networking Stack to find and fix the break in the communication chain.
This task is part of my hands-on practice on the KodeKloud Engineer platform, which I highly recommend for anyone looking to master real-world DevOps scenarios.
π― Objective
- Diagnose why
datacenter-ec2is inaccessible despite correct Security Group settings. - Verify and attach an Internet Gateway (IGW) to the VPC if missing.
- Update the Route Table to forward external traffic (
0.0.0.0/0) to the IGW. - Ensure the instance has a valid Public IPv4 Address.
- Restore public access to the Nginx web server on Port 80.
π‘ Why VPC Configuration is the Backbone
You can have the best security rules in the world, but if the "roads" (routes) aren't built, no traffic will ever arrive at your front door.
πΉ Key Concepts
- Internet Gateway (IGW): Think of this as the border crossing between your private VPC and the public internet. Without it, your VPC is an island.
- Default Route (0.0.0.0/0): This route tells the subnet: "If you don't know where a packet is going, send it to the Internet Gateway."
- Public vs. Private Subnets: A subnet only becomes "Public" once it has a route entry pointing to an IGW.
π οΈ Step-by-Step: The Troubleshooting Workflow
πΉ Phase A: Verify and Attach the Internet Gateway
- Check IGWs: Navigate to VPC Dashboard > Internet Gateways.
-
Attachment: Ensure
datacenter-igwis in the Attached state. -
The Fix: If an IGW exists but is "Detached," select it, click Actions, and choose Attach to VPC, then select
datacenter-vpc.
πΉ Phase B: Configure the Route Table
- Identify Table: Go to Subnets, select the subnet hosting your EC2, and look at the Route Table tab.
- Add the Default Route:
- Click Edit routes.
- Add a route with Destination:
0.0.0.0/0. - Set Target:
Internet Gatewayand select your attached IGW.
πΉ Phase C: Confirm Public IP and Service
-
Instance Settings: Verify that
datacenter-ec2actually has a Public IPv4 address assigned in the EC2 Console. -
Service Check: SSH into the instance and ensure Nginx is active:
sudo systemctl status nginx
β Verify Success
- External Ping: Open your browser and type the Public IP of the instance.
- Confirm: π If the "Welcome to nginx!" page loads, mission accomplished! You have successfully re-established the network path.
π Key Takeaways
- π Routing Hierarchy: Security Groups (Instance level) can only work if the Route Table (Subnet level) allows the traffic through.
- π‘οΈ Gateway Dependency: A VPC can have multiple subnets, but all public-facing ones must point to the same Internet Gateway.
- π Instant Effect: Once you save the route table change, the connectivity restoration is usually instantaneous.
π« Common Mistakes
- Missing IGW: Creating the gateway but forgetting to "Attach" it to the specific VPC.
- Wrong Subnet: Updating a route table for a different subnet than the one the EC2 instance is actually using.
- NACL Overlap: Forgetting that Network ACLs could also be blocking traffic at the subnet boundary.
π Final Thoughts
Troubleshooting VPC reachability is one of the most common real-world tasks for a DevOps Engineer. By mastering the relationship between IGWs and Route Tables, you ensure your infrastructure is not just built, but actually accessible to your users.
π Practice Like a Pro
If you want to try these tasks yourself in a real AWS environment, check out:
π KodeKloud Engineer - Practice Labs
Itβs where Iβve been sharpening my skills daily!
π Letβs Connect
- π¬ LinkedIn: Hritik Raj
- β Support my journey on GitHub: 100 Days of Cloud








Top comments (0)