惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Jina AI
Jina AI
S
SegmentFault 最新的问题
D
DataBreaches.Net
H
Help Net Security
有赞技术团队
有赞技术团队
M
MIT News - Artificial intelligence
Martin Fowler
Martin Fowler
IT之家
IT之家
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
腾讯CDC
罗磊的独立博客
Y
Y Combinator Blog
阮一峰的网络日志
阮一峰的网络日志
云风的 BLOG
云风的 BLOG
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
WordPress大学
WordPress大学
Microsoft Security Blog
Microsoft Security Blog
J
Java Code Geeks
Vercel News
Vercel News
Hugging Face - Blog
Hugging Face - Blog
aimingoo的专栏
aimingoo的专栏
Stack Overflow Blog
Stack Overflow Blog
Recent Announcements
Recent Announcements
博客园 - 三生石上(FineUI控件)

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
The Beginner’s Guide to Private vs Public IPs, Ex - Banki...
Nagesh K · 2026-06-24 · via DEV Community

When I first studied IP addresses, I thought:
“Private IPs are only inside my router, and public IPs are only for the router itself.”

But that’s not the full story. In real production systems — like a banking website — both public and private IPs exist together. Each has a specific role, and understanding this is the key to mastering AWS networking.

🌍 Why Not Make Everything Public?

Imagine a bank has three servers:
Website Server
Application Server
Database Server

Option 1: Give all three public IPs.
Technically possible, but very dangerous.

Why? Because attackers could directly connect to the database server from anywhere on the internet. That’s exposing the vault to the street.

✅ Better Design: Public + Private Together

Here’s the safer architecture:
Customer

Internet

Website Server (Public IP)

Application Server (Private IP)

Database Server (Private IP)

🪜 Step‑Wise Banking Example

Step 1: Customer Opens Website
You type : **mybank.com
**Your browser reaches the Web Server at:
Public IP = 13.233.10.100
This must be public because customers worldwide need access.

Step 2: Login Request

You enter username + password.
The request hits the Web Server (Public IP).

Step 3: Web Server Needs Data

The web server doesn’t store balances. It calls the Application Server: Private IP = 10.0.2.10
This server is inside the bank’s private network.

Step 4: Application Server Queries Database

The app server asks the Database: Private IP = 10.0.3.20
Database returns: Balance = ₹50,000

Step 5: Response Flow

Database → App Server → Web Server → Customer Browser.
You see: Welcome Nagesh , Balance: ₹50,000

🔒 Why Use Private IP for Database?

Because the database contains:
Passwords
Balances
Transactions
Customer data

We don’t want random internet users scanning or attacking it.
With a private IP, the database is invisible from outside.

👨‍💻 How Do Bank Employees Access Private Systems?

This is the part most beginners get confused about. Employees don’t “log in” directly to a private IP from their laptops. Instead:

Method 1: Inside Bank Network
Employee PCs are already inside the private LAN. Their devices get private IPs (like 10.1.1.50) and can reach the database (10.0.3.20) internally.

Method 2: VPN (Very Common)
Employees working remotely connect via a VPN tunnel.
Their laptop joins the bank’s private network virtually.
Now they can reach private servers safely.

Method 3: Bastion Host (AWS)
In cloud setups, employees first connect to a bastion host (a secure jump server with a public IP). From there, they can access private servers inside the VPC.

🎯 The Most Important Rule

Private IP ≠ Nobody can access it.
Private IP = Cannot be directly reached from the public internet.

Access is possible only if:
You’re inside the private network, or You connect through VPN, bastion host, or secure tunnels.

☁️ AWS Translation

Banking Architecture → AWS Setup:
Internet

Load Balancer (Public IP)

EC2 Web Server (Public IP)

EC2 App Server (Private IP)

RDS Database (Private IP)

🚀 Final Reflection

At first, I thought public vs private IPs were just about routers and home devices. But now I see:
Public IPs are for systems that must be reachable from the internet.
Private IPs are for internal systems that should only communicate within trusted networks.
This banking example makes it crystal clear — and it’s the same principle AWS VPCs, subnets, NAT gateways, and security groups are built on.