Skip to content

mrtnzjhonatan/aws-vpc-secure-infrastructure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 

Repository files navigation

aws-vpc-secure-infrastructure

This project demonstrates the design and deployment of a segmented AWS cloud network architecture using a VPC, public and private subnets, NAT Gateway, Internet Gateway, route tables, and Network ACL security controls.

The goal was to simulate a secure cloud environment where public-facing services are separated from internal resources while maintaining outbound connectivity.


Architecture Diagram

AWS Architecture

Infrastructure Components

VPC CIDR: 10.0.0.0/16

Public Subnet 10.0.1.0/24 Hosts public resources and NAT Gateway

Private Subnet 10.0.2.0/24 Hosts internal EC2 instances with no direct internet access

Internet Gateway Provides inbound and outbound internet connectivity for the public subnet

NAT Gateway Allows private subnet instances to access the internet securely

Route Tables Public subnet routes internet traffic to the Internet Gateway Private subnet routes internet traffic through the NAT Gateway

Network ACL Restricts inbound traffic to HTTP and ephemeral return traffic

Deployment Steps

  1. Created a VPC with CIDR block 10.0.0.0/16

VPC Creation

VPC Creation

  1. Created two subnets:
    • Public Subnet: 10.0.1.0/24
    • Private Subnet: 10.0.2.0/24

Subnet Creation

Subnet Creation

  1. Attached an Internet Gateway to the VPC

  2. Created a NAT Gateway in the public subnet

NAT Gateway Creation

NAT Gateway

  1. Configured route tables: Public Route Table 0.0.0.0/0 → Internet Gateway

    Private Route Table 0.0.0.0/0 → NAT Gateway

Route Tables

NAT Gateway

  1. Configured Network ACL rules to allow HTTP traffic and ephemeral return ports

NACLs

NAT Gateway

  1. Launched EC2 instances in both subnets for connectivity testing

Testing and Validation

Public EC2 Instance

  • Verified inbound HTTP connectivity from internet
  • Confirmed instance is reachable through Internet Gateway

Private EC2 Instance

  • Confirmed instance cannot be accessed directly from the internet
  • Verified outbound connectivity using NAT Gateway

Troubleshooting

Issue: Private EC2 instance could not access external websites.

Cause: Private subnet route table was missing NAT Gateway route.

Solution: Updated route table:

0.0.0.0/0 → NAT Gateway

Result: Outbound internet connectivity restored.

About

Designed and deployed a secure AWS VPC infrastructure with public and private subnets, NAT Gateway, Internet Gateway, route tables, and Network ACLs to control inbound and outbound traffic.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors