Learn Basic Networking
What is an IP Address?
An IP (Internet Protocol) Address is a unique numerical label assigned to every device connected to a computer network. Think of it as the mailing address of the internet. Without it, routers wouldn't know where to send your web traffic, emails, or streaming videos.
172.56.21.89 (IPv4 - 32-bit address)
Public vs. Private IP Addresses
Not all IP addresses can be reached from the outside world. Networking separates addresses to protect and organize your devices:
Public IP Address
Like the street address of your apartment building. It is globally unique, visible to the whole internet, and assigned to your home router by your ISP. The outside world uses this to find your network.
Private IP Address
Like the internal apartment room numbers inside the building (e.g., 192.168.1.15). Your router assigns these to your devices. They are invisible to the public internet, keeping your home devices secure.
How Your Router & NAT Work
If you have ten devices at home but only one public IP, how does data get back to the right device? Your router acts like a smart mailroom postmaster using a technology called NAT (Network Address Translation).
When your laptop requests a web page, the router packages the request under your single public IP. When the web page replies, the router remembers which internal device made the request, converts the address, and safely forwards it to your laptop.
What are Ports & Protocols?
If an IP address is like a building, Ports are like the numbered loading docks or entrance doors. A server runs different services simultaneously, and ports make sure traffic goes to the correct service.
Protocols are the formal "languages" spoken at these doors:
- HTTP (Port 80) & HTTPS (Port 443): The standard languages for loading website pages.
- SSH (Port 22): A secure, encrypted tunnel used by developers to manage servers.
- DNS (Port 53): The phonebook of the web, converting domain names into IPs.
Double NAT (Multiple Routers)
If your network shows a Private IP Address (e.g. 192.168.x.x or Carrier-Grade NAT 100.64.x.x), it means your server is running behind Double NAT.
This occurs when two routers are stacked in a row, each translating addresses. The most common scenario is your ISP combined modem/router performing translation first, followed by your custom local router translating it a second time.
The Cloudflare Tunnel Solution: You bypass Double NAT entirely using a Cloudflare Tunnel! Cloudflare establishes an outgoing secure channel from your Docker container directly to their global servers, completely routing around any inbound blocking routers.