Before You Forward That Port
Someone in a forum told you to "just forward port 8080" so your home server or game or camera would be reachable from outside. Before you do it, it's worth knowing what that setting actually does, because it's one of the few router options that can change your home network from "pretty safe by default" to "open to the whole internet."
Quick background. Your router has one public IP address. Everything inside your house uses private addresses that nobody outside can reach directly. When your laptop starts a connection out, the router keeps track of it and lets the replies back in. But when something on the internet tries to start a connection to you, the router has no idea which device it's for, so it drops it. That default is a big part of why home networks are as safe as they are.
Port forwarding is a rule that says: anything arriving on this port, send it to this device.
Internet → your public IP, port 8080 → router → 192.168.1.50:8080
Now that device is on the internet. Not just to you. To everyone.
And "everyone" includes a constant stream of automated scanners that sweep the entire IPv4 address space looking for open ports. They're not targeting you specifically. They're checking every address, all the time, and cataloging what answers. Open a port and expect it to get poked at quickly, by things trying default passwords, known vulnerabilities and common admin paths.
So the real question isn't whether the port gets found. It's whether whatever's listening on it can handle that. A few things make it go badly:
The software is old. Cheap IP cameras, older NAS boxes and routers themselves have a long history of security bugs, and many stop getting updates. Exposing one of those directly is asking for trouble.
The login is weak, or there isn't one. Plenty of self-hosted apps assume they're on a trusted local network. Their admin panel might have no password by default, or a famous default one.
It's plain HTTP. Anything you type, including passwords, crosses the internet unencrypted.
You forgot about it. This is the sneaky one. A rule you made for a weekend project stays open for years, pointing at a device you've stopped updating.
Also, check whether your router has UPnP enabled. It lets devices and apps open ports for themselves without asking you. Some games and consoles rely on it, but it also means you may have open ports you never chose. If you don't need it, I'd turn it off, and either way it's worth looking at your router's list of current forwards.
So what should you do instead? Depends on what you're trying to reach.
If it's just you (or your household) accessing your own stuff remotely, use a VPN back into your home network. WireGuard is fast and simple, and tools built on it like Tailscale take nearly all of the setup pain away. You get access to everything at home and nothing is exposed publicly. For personal use, this is what I'd do almost every time.
If you're sharing a website or app with other people, a tunnel service like Cloudflare Tunnel lets you publish it without opening any inbound ports at all. Your server makes an outbound connection to the service, and traffic comes in through that.
If you do forward ports, keep it tight. Forward only 80 and 443 to a reverse proxy that handles HTTPS, and let the proxy route to your apps internally. That's one well-maintained piece of software on the internet instead of five. Keep it updated, put real authentication in front of anything administrative, and consider something like fail2ban or CrowdSec to block repeated failed logins.
Never forward these straight to the internet if you can avoid it: remote desktop, SMB file sharing, database ports, camera admin pages, router admin pages. Those get attacked constantly.
Port forwarding isn't evil. It's just a door. Fine to have one, as long as you know which room it opens into and you've locked whatever's in there.

Comments