Code from github to self hosted with git tea in AWS
126
aws-vpc-from-scratch/AWS-VPC-FROM-SCRATCH-README.md
Normal file
@@ -0,0 +1,126 @@
|
||||
# AWS VPC From Scratch
|
||||
|
||||
A production-style AWS Virtual Private Cloud (VPC) built
|
||||
from scratch with public/private subnet isolation,
|
||||
Bastion Host access pattern, NAT Gateway,
|
||||
and multi-layer network security.
|
||||
|
||||
---
|
||||
## 📸 Screenshots
|
||||
|
||||
> All build screenshots are available in the [`/images`](./images) folder, numbered `1` through `36` in chronological build order.
|
||||
---
|
||||
|
||||
### VPC Dashboard
|
||||

|
||||
|
||||
### SSH into Bastion
|
||||

|
||||
|
||||
### SSH Jump to Private EC2
|
||||

|
||||
|
||||
### Internet Test
|
||||

|
||||
---
|
||||
## Architecture
|
||||
```
|
||||
┌─────────────────────────────────────────────────┐
|
||||
│ VPC (10.0.0.0/16) │
|
||||
│ │
|
||||
│ ┌───────────────────────┐ │
|
||||
│ │ Public Subnet │ │
|
||||
│ │ 10.0.1.0/24 │ │
|
||||
│ │ │ │
|
||||
│ │ [Bastion Host EC2] │ │
|
||||
│ │ [NAT Gateway] │ │
|
||||
│ └──────────┬────────────┘ │
|
||||
│ │ SSH Jump │
|
||||
│ ┌──────────▼────────────┐ │
|
||||
│ │ Private Subnet │ │
|
||||
│ │ 10.0.2.0/24 │ │
|
||||
│ │ │ │
|
||||
│ │ [Private EC2] │ │
|
||||
│ │ (No Public IP) │ │
|
||||
│ └───────────────────────┘ │
|
||||
│ │
|
||||
│ public-rt → IGW (internet in + out) │
|
||||
│ private-rt → NAT (outbound only) │
|
||||
└─────────────────────┬───────────────────────────┘
|
||||
│
|
||||
[Internet Gateway]
|
||||
│
|
||||
Internet
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## AWS Services Used
|
||||
|
||||
- VPC + Subnets (Public & Private)
|
||||
- Internet Gateway
|
||||
- NAT Gateway
|
||||
- Route Tables
|
||||
- Security Groups
|
||||
- Network ACLs (NACLs)
|
||||
- EC2 (Bastion Host + Private Instance)
|
||||
|
||||
---
|
||||
|
||||
## Network Design
|
||||
|
||||
| Component | Value |
|
||||
|---|---|
|
||||
| VPC CIDR | 10.0.0.0/16 |
|
||||
| Public Subnet | 10.0.1.0/24 |
|
||||
| Private Subnet | 10.0.2.0/24 |
|
||||
| Bastion Host | Public Subnet — t2.micro |
|
||||
| Private EC2 | Private Subnet — t2.micro (no public IP) |
|
||||
|
||||
---
|
||||
|
||||
## Security Design
|
||||
|
||||
### Security Groups (Instance Level)
|
||||
| SG | Inbound Rule |
|
||||
|---|---|
|
||||
| bastion-sg | SSH port 22 from my IP only (/32) |
|
||||
| private-ec2-sg | SSH port 22 from bastion-sg only |
|
||||
|
||||
### NACLs (Subnet Level)
|
||||
| NACL | Inbound Rules |
|
||||
|---|---|
|
||||
| public-nacl | Allow SSH (22) + Ephemeral ports (1024-65535) |
|
||||
| private-nacl | Allow SSH from 10.0.1.0/24 + Ephemeral ports |
|
||||
|
||||
---
|
||||
|
||||
## Key Concepts Demonstrated
|
||||
|
||||
- Public vs Private subnet isolation
|
||||
- Internet Gateway vs NAT Gateway
|
||||
- Bastion Host / Jump Server pattern
|
||||
- Stateful (SG) vs Stateless (NACL) firewalls
|
||||
- Defense-in-depth network security
|
||||
- CIDR block planning
|
||||
|
||||
---
|
||||
|
||||
## Test Results
|
||||
|
||||
| Test | Result |
|
||||
|---|---|
|
||||
| SSH into Bastion Host | ✅ |
|
||||
| SSH jump to Private EC2 via Bastion | ✅ |
|
||||
| ping google.com from Private EC2 | ✅ |
|
||||
| Private EC2 unreachable from internet directly | ✅ |
|
||||
| NACL IP block test | ✅ |
|
||||
|
||||
---
|
||||
## 👨💻 Author
|
||||
|
||||
**Aditya Nair**
|
||||
- GitHub: [@ADITYANAIR01](https://github.com/ADITYANAIR01)
|
||||
- LinkedIn: [linkedin.com/in/adityanair001](https://www.linkedin.com/in/adityanair001)
|
||||
|
||||
---
|
||||
BIN
aws-vpc-from-scratch/images/aws-vpc-from-scratch-01.png
Normal file
|
After Width: | Height: | Size: 242 KiB |
BIN
aws-vpc-from-scratch/images/aws-vpc-from-scratch-02.png
Normal file
|
After Width: | Height: | Size: 422 KiB |
BIN
aws-vpc-from-scratch/images/aws-vpc-from-scratch-03.png
Normal file
|
After Width: | Height: | Size: 213 KiB |
BIN
aws-vpc-from-scratch/images/aws-vpc-from-scratch-04.png
Normal file
|
After Width: | Height: | Size: 204 KiB |
BIN
aws-vpc-from-scratch/images/aws-vpc-from-scratch-05.png
Normal file
|
After Width: | Height: | Size: 205 KiB |
BIN
aws-vpc-from-scratch/images/aws-vpc-from-scratch-06.png
Normal file
|
After Width: | Height: | Size: 225 KiB |
BIN
aws-vpc-from-scratch/images/aws-vpc-from-scratch-07.png
Normal file
|
After Width: | Height: | Size: 200 KiB |
BIN
aws-vpc-from-scratch/images/aws-vpc-from-scratch-08.png
Normal file
|
After Width: | Height: | Size: 136 KiB |
BIN
aws-vpc-from-scratch/images/aws-vpc-from-scratch-09.png
Normal file
|
After Width: | Height: | Size: 241 KiB |
BIN
aws-vpc-from-scratch/images/aws-vpc-from-scratch-10.png
Normal file
|
After Width: | Height: | Size: 243 KiB |
BIN
aws-vpc-from-scratch/images/aws-vpc-from-scratch-11.png
Normal file
|
After Width: | Height: | Size: 529 KiB |
BIN
aws-vpc-from-scratch/images/aws-vpc-from-scratch-12.png
Normal file
|
After Width: | Height: | Size: 493 KiB |
BIN
aws-vpc-from-scratch/images/aws-vpc-from-scratch-13.png
Normal file
|
After Width: | Height: | Size: 290 KiB |
BIN
aws-vpc-from-scratch/images/aws-vpc-from-scratch-14.png
Normal file
|
After Width: | Height: | Size: 241 KiB |
BIN
aws-vpc-from-scratch/images/aws-vpc-from-scratch-15.png
Normal file
|
After Width: | Height: | Size: 379 KiB |
BIN
aws-vpc-from-scratch/images/aws-vpc-from-scratch-16.png
Normal file
|
After Width: | Height: | Size: 288 KiB |
BIN
aws-vpc-from-scratch/images/aws-vpc-from-scratch-17.png
Normal file
|
After Width: | Height: | Size: 365 KiB |
BIN
aws-vpc-from-scratch/images/aws-vpc-from-scratch-18.png
Normal file
|
After Width: | Height: | Size: 308 KiB |
BIN
aws-vpc-from-scratch/images/aws-vpc-from-scratch-19.png
Normal file
|
After Width: | Height: | Size: 233 KiB |
BIN
aws-vpc-from-scratch/images/aws-vpc-from-scratch-20.png
Normal file
|
After Width: | Height: | Size: 268 KiB |
BIN
aws-vpc-from-scratch/images/aws-vpc-from-scratch-21.png
Normal file
|
After Width: | Height: | Size: 265 KiB |
BIN
aws-vpc-from-scratch/images/aws-vpc-from-scratch-22.png
Normal file
|
After Width: | Height: | Size: 403 KiB |
BIN
aws-vpc-from-scratch/images/aws-vpc-from-scratch-23.png
Normal file
|
After Width: | Height: | Size: 652 KiB |
BIN
aws-vpc-from-scratch/images/aws-vpc-from-scratch-24.png
Normal file
|
After Width: | Height: | Size: 645 KiB |
BIN
aws-vpc-from-scratch/images/aws-vpc-from-scratch-25.png
Normal file
|
After Width: | Height: | Size: 683 KiB |
BIN
aws-vpc-from-scratch/images/aws-vpc-from-scratch-26.png
Normal file
|
After Width: | Height: | Size: 296 KiB |
BIN
aws-vpc-from-scratch/images/aws-vpc-from-scratch-27.png
Normal file
|
After Width: | Height: | Size: 256 KiB |
BIN
aws-vpc-from-scratch/images/aws-vpc-from-scratch-28.png
Normal file
|
After Width: | Height: | Size: 222 KiB |
BIN
aws-vpc-from-scratch/images/aws-vpc-from-scratch-29.png
Normal file
|
After Width: | Height: | Size: 287 KiB |
BIN
aws-vpc-from-scratch/images/aws-vpc-from-scratch-30.png
Normal file
|
After Width: | Height: | Size: 295 KiB |
BIN
aws-vpc-from-scratch/images/aws-vpc-from-scratch-31.png
Normal file
|
After Width: | Height: | Size: 249 KiB |
BIN
aws-vpc-from-scratch/images/aws-vpc-from-scratch-32.png
Normal file
|
After Width: | Height: | Size: 221 KiB |
BIN
aws-vpc-from-scratch/images/aws-vpc-from-scratch-33.png
Normal file
|
After Width: | Height: | Size: 293 KiB |
BIN
aws-vpc-from-scratch/images/aws-vpc-from-scratch-34.png
Normal file
|
After Width: | Height: | Size: 284 KiB |
BIN
aws-vpc-from-scratch/images/aws-vpc-from-scratch-35.png
Normal file
|
After Width: | Height: | Size: 176 KiB |
BIN
aws-vpc-from-scratch/images/aws-vpc-from-scratch-36.png
Normal file
|
After Width: | Height: | Size: 693 KiB |