Blog · Home server
Port forwarding and your public IP
When you host a game server or camera at home, friends connect to your public IP (plus port). Use What Is My IP Address IP to see today’s address; if it changes, update your DNS or DDNS.
How forwarding fits with NAT
Your router’s NAT table sends unsolicited packets from the internet to one private device when you map an external port to an internal IP and port. Without that mapping, inbound connections stop at the router. Outbound browsing still works because established sessions are tracked automatically.
Dynamic IP and DDNS
If your ISP rotates addresses, bookmarking your numeric IP breaks. Dynamic DNS services update a hostname when the WAN IP changes. Whether you need that or a paid static IP is covered in static vs dynamic and how to change your public IP.
Security basics
Every forwarded port is a smaller attack surface. Patch what you expose, use strong passwords or keys, and prefer VPN into home over exposing many services. Abuse can hurt IP reputation for your line.
People also ask
UPnP vs manual forwards? UPnP lets apps request mappings automatically—convenient but review what opened.
IPv6 port exposure? With global addresses, some setups need firewall rules explicitly—don’t assume NAT hides everything.
Extended guide: hosting safely from home
Port forwarding connects the internet to a specific device on your LAN. That is powerful for home labs, cameras, and games, but it means you are responsible for patching whatever listens on those ports. Prefer keys over passwords for SSH, disable default accounts, and expose the minimum surface.
Dynamic public IPs complicate bookmarks. Dynamic DNS maps a hostname to your current WAN address; when the IP rotates, the DDNS client updates the record. If you skip that, remote users will try to connect to an old number.
Double NAT breaks many automatic port mapping scenarios—fix topology first (bridge mode, single router) before chasing application bugs.
If inbound reliability matters more than cost, compare static IP plans or a small VPS with reverse tunnel rather than exposing home gear directly.
Log forwarding attempts sparingly—too noisy on busy ranges—but do monitor auth logs for SSH if exposed.
Consider ISP terms of service: some consumer plans disallow servers; business tiers may be required for sustained inbound traffic.
CGNAT and port forwarding: when it never works
If your ISP places you behind carrier-grade NAT, you do not receive a unique public IPv4 on your router’s WAN port. In that topology, inbound port forwarding on your CPE cannot reach the internet because no globally routable address sits on your side of the NAT. Symptoms include “works on LAN, fails off-network” even with correct rules. Fixes often mean IPv6 with proper firewall rules, a tunnel/VPN service with a public endpoint, or upgrading to a business line with a real public IPv4.
Test by comparing our checker’s IPv4 to your router’s reported WAN address. If they differ wildly or the WAN shows a 100.64.0.0/10 range, you are likely behind CGNAT. Document that before spending hours on game port guides.
IPv6 users should avoid assuming “no NAT means safe.” Global addresses need firewall rules that default deny inbound unless you explicitly host services. Many routers ship with reasonable defaults, but lab setups sometimes punch holes too wide.
When using reverse proxies or cloud tunnels (Cloudflare Tunnel, ngrok), you may not need traditional port forwards at all—the agent initiates outbound-only connections. Evaluate that pattern before exposing raw ports.
Monitoring and alerts
If you expose services, add login failure alerts and geo alerts when possible—noise early beats ransomware later.
Separate management interfaces from public services via VPN or restricted admin ports; do not forward wide-open admin panels “temporarily.”
IPv6 exposure needs explicit allow rules—document them alongside IPv4 forwards so upgrades do not silently open holes.
Test from an external network (mobile data) after each router change—LAN tests lie about NAT hairpin behavior.
Keep a rollback plan: export working configs before firmware updates.
Community forums help, but verify advice against vendor docs—well-meaning shortcuts create security debt.
When in doubt, do not forward
If you cannot explain why a port needs to face the internet, leave it closed. Convenience without purpose is how archives of breached cameras keep growing.
Summary checklist
Need inbound → pick internal static IP for target → forward port → test from external network → monitor logs → set DDNS if dynamic WAN. Skip optional steps only if you truly understand why.
Re-test after firmware updates—rules sometimes reset on buggy routers.
Related guides
- NAT and your public IP — why forwarding exists.
- Static vs dynamic IP — stability vs rotation.
- Same Wi‑Fi, same public IP? — household context.