Public IP
You often hear the term "Public IP" when using the internet. It is an essential concept to understand, especially if you are hosting a game server or accessing your computer remotely.
1. What is a Public IP?
A Public IP is a unique address that identifies your computer (or router) on the global internet network. It is assigned to you by your ISP (Internet Service Provider).
The Analogy: Street Address
- Public IP: "123 Teheran-ro, Gangnam-gu, Seoul" (Unique global address)
- Private IP: "Living Room", "Bedroom" (Local names inside your house)
For a package (data) to reach your house, the sender must know your Public IP (Street Address).
2. Public vs. Private IP
| Feature | Public IP | Private IP |
|---|---|---|
| Issuer | ISP (Internet Company) | Router |
| Scope | Accessible from anywhere globally | Accessible only within the local network |
| Uniqueness | Globally Unique | Non-unique (Many houses use 192.168...) |
| How to Check | Search "My IP", [curl](/en/computer/c/curl) ifconfig.me |
Command ifconfig, ipconfig |
3. How to Check Your Public IP
Running ifconfig in a terminal usually shows a Private IP like 192.168.x.x. To see your real external IP, you need to ask an external server.
# The easiest way via terminal
curl ifconfig.me
4. Dynamic vs. Static IP
Most home networks use Dynamic IP. The address changes if you restart the modem or after a certain period. For servers that need a permanent address, a Static IP is used (usually for an extra fee).
Security Tip: Your Public IP reveals your actual digital location. Be careful not to expose it in untrusted chat rooms or communities.