π₯ DEVOPS NETWORKING PROJECT
βService Is UP but NOT Reachableβ (AWS EC2 β Ubuntu)
π― PROJECT GOAL
- Run a real service on EC2
- Break network access in real ways
- Learn exactly what to check and in what order
- Be able to answer the interview question confidently
π§ ONE RULE (MEMORIZE)
App β Port β Binding β Local Test β Linux Firewall β Routing β Cloud Firewall β DNS
STEP 0 β CONNECT TO EC2
ssh ubuntu@<EC2_PUBLIC_IP>
STEP 1 β CREATE A REAL SERVICE (APP LAYER)
echo "Hello DevOps Networking" > index.html
python3 -m http.server 8080
β TEST 1 β IS THE SERVICE RUNNING?
curl http://localhost:8080
Expected
Hello DevOps Networking
Meaning
- App is running
- App responds
- NOT a code problem
STEP 2 β CHECK PORT & PROCESS
ss -tulnp | grep 8080
Expected
tcp LISTEN 0.0.0.0:8080 python3
What you check here
- Port number
- LISTEN state
- Process name
Meaning
- Port is open
- No conflict
- Service accepts traffic
STEP 3 β CHECK IP & ROUTING
CHECK INTERFACES
ip a
Find:
inet 172.31.x.x
CHECK ROUTES
ip r
Find:
default via 172.31.x.1
Meaning
- Server has IP
- Server knows how to send traffic
STEP 4 β TEST USING SERVER IP (LOCAL NETWORK)
curl http://<PRIVATE_IP>:8080
Expected
Hello DevOps Networking
Meaning
- Linux networking is OK
STEP 5 β CHECK LINUX FIREWALLS
CHECK UFW
sudo ufw status
Expected:
Status: inactive
CHECK IPTABLES
sudo iptables -L -n
Expected:
policy ACCEPT
Meaning
- Linux is NOT blocking traffic
STEP 6 β TEST PORT OWNERSHIP (PORT TROUBLESHOOTING)
lsof -i :8080
Expected
python3
Meaning
- Correct app owns the port
STEP 7 β TEST FROM OUTSIDE (REAL PROBLEM)
Open in browser:
http://<EC2_PUBLIC_IP>:8080
Result
β Page does NOT open
π¨ WHY IT FAILS (THIS IS THE LESSON)
AWS blocks traffic before it reaches Linux.
STEP 8 β FIX CLOUD FIREWALL (AWS SECURITY GROUP)
In AWS Console β Security Group β Inbound Rules
Add:
| Type | Port | Source |
|---|---|---|
| TCP | 8080 | Your IP or 0.0.0.0/0 |
Save.
STEP 9 β TEST AGAIN
Open:
http://<EC2_PUBLIC_IP>:8080
Expected
Hello DevOps Networking
π SUCCESS
STEP 10 β DNS TEST (OPTIONAL BUT IMPORTANT)
Test IP works
curl http://<EC2_PUBLIC_IP>:8080
Test domain
curl http://myapp.example.com:8080
Check DNS
nslookup myapp.example.com
Meaning
- DNS maps name β IP
π ERROR TYPES & WHAT THEY MEAN
| Error | Meaning |
|---|---|
| Timeout | Firewall / SG |
| Connection refused | App down |
| Works on localhost only | Wrong binding |
| Works with IP only | DNS issue |
π€ INTERVIEW ANSWER (MEMORIZE)
βI check layer by layer.
First I verify the service locally.
Then I check port and binding.
After that I check Linux firewall and routing.
If Linux is open, I check cloud firewalls like Security Groups and DNS.β
β WHAT THIS PROJECT COVERS
β IP, ports, routing
β ip a, ip r
β ss, netstat
β curl, wget
β ufw, iptables
β lsof -i
β Interview question
Top comments (0)