Every open port on your router is an invitation. You mean to send it only to yourself, but the whole internet can knock on that door.
If you run a home server, a NAS, a local AI model, or anything else you want to reach from outside your house, you’ve probably hit this wall. Port forwarding works, but it trades convenience for a permanently exposed attack surface. There’s a cleaner way, and it’s free to start.
Why Port Forwarding Is a Bad Habit
When your devices sit behind a home router, they share a single public IP. The router uses private IPs internally—addresses like 192.168.x.x that the outside world can’t reach directly. That’s actually good for security.
Port forwarding punches a hole in that protection. You tell the router: “Any traffic arriving on port 8096, send it to my media server.” Now you can reach Jellyfin from a coffee shop, but so can anyone else who finds that port. Credential stuffing, brute-force attacks, and zero-day exploits in the software you’re running all become live threats. Keeping it safe means obsessive patching, strong passwords, and constant vigilance—a part-time job you didn’t sign up for.
A Better Primitive: UDP Hole Punching
The alternative is to never open the port at all. Instead, both devices reach out to each other simultaneously. This technique is called UDP hole punching.
Here’s the short version of how it works:
- Both devices connect to a lightweight coordination server and announce themselves.
- The coordination server tells each device where the other one is and signals them to send packets to each other at the same time.
- Most routers, when they see outbound traffic leaving, temporarily trust return traffic from that same destination. Two devices firing at each other simultaneously tricks both routers into letting the connection through.
- A direct, encrypted tunnel forms—no port left open, no permanent hole in your firewall.
If hole punching fails (some carrier-grade NAT setups block it), traffic falls back through an encrypted relay. Either way, nothing on your router changes.
Tailscale Packages All of This in About a Minute
Tailscale is the easiest way to use this approach. It handles the coordination, the hole punching, and the encryption (via WireGuard under the hood) so you don’t have to think about any of it.
Setup is genuinely this fast:
- Install Tailscale on every device you want to link—laptop, home server, Raspberry Pi, whatever. The client is small and runs on Windows, macOS, Linux, iOS, and Android.
- Log in with a Google, GitHub, or Microsoft account.
- Each device gets a stable virtual IP in the
100.x.x.xrange.
That’s it. Your laptop at a hotel can now reach your home server at 100.64.0.5 as if both were on the same desk. No router changes. No firewall rules.
Practical Things You Can Do Right Away
- Access a NAS remotely. Point your file manager or browser at the NAS’s Tailscale IP. If your NAS runs a web UI on port 5000, hit
100.x.x.x:5000from anywhere. - Reach a local AI. Running Open WebUI or Ollama on a home machine? Connect to its port over Tailscale instead of exposing it to the world.
- Self-hosted VPN. Tailscale lets you designate any device as an exit node. Set your home machine (or a cheap cloud VPS) as the exit node and all your traffic routes through it, changing your apparent IP. Useful for accessing region-locked services or staying off sketchy public Wi-Fi.
- Browse another computer’s files without a NAS. Enable Windows file sharing on a folder or spin up a tiny web server script, then access it via the Tailscale IP. Simpler than fighting share permissions.
If You Don’t Want to Trust a Third-Party Coordinator
Tailscale’s coordination server is the one piece that isn’t self-hosted. For most people that’s fine—the actual data travels directly between your devices and is end-to-end encrypted. Tailscale never sees your traffic.
But if you’d rather own the whole stack, Headscale is a self-hosted, open-source drop-in for the coordination layer. Run it on a small VPS, point your Tailscale clients at it, and you’ve removed the dependency entirely. It’s more setup, but it’s fully documented and actively maintained.
The One Thing to Remember
Open ports are a liability that compounds over time. Every piece of software you expose has a vulnerability timeline—a window between discovery and patch where you’re at risk. Closing that exposure by using a hole-punched, encrypted mesh like Tailscale means the attack surface shrinks to nearly zero, and your patching anxiety shrinks with it.
Install it on two devices tonight. The setup takes less time than reading this article took.