You want to view your home security camera from the office, or reach network storage while travelling. Every guide mentions one term: port forwarding.
The configuration itself takes five minutes. What makes people give up is something invisible in any menu, and it's worth checking first.
What's actually happening
Every device in your home shares a single internet-facing address. The router hands out local addresses to each device and translates traffic in and out, explained in the guide to local IPs and DHCP.
For traffic you start from inside, the router remembers who asked and knows where to send the reply. For an unsolicited request arriving from outside, the router has no clue at all, so it discards it.
Port forwarding is the note you write: "if a request comes in on this port, pass it to this device."
Check this before anything else
Most failures end here, and checking takes one minute.
Many home subscriptions in Indonesia don't provide a real public IP address. Instead, dozens to hundreds of customers share one address through a mechanism called CGNAT. In that arrangement, requests from outside never reach your router, so no setting can help.
Note the WAN address on the router
Open the router's settings page, find the status or WAN section, and note the IP address shown there.
Note the address visible from the internet
In a browser, search "my IP" and note the number displayed.
Compare them
An exact match means you have a public address and port forwarding can work. A difference means you're behind CGNAT, continue to the alternatives below.
If you turn out to be behind CGNAT. Some providers offer a public IP address as a paid add-on, usually for business customers. Ask customer service using the term "static public IP", they'll know immediately what you mean.
There's a shortcut that's often quicker than comparing two numbers: look at how the router's WAN address starts. If it falls between 100.64.x.x and 100.127.x.x, that's shared address space reserved specifically for CGNAT (RFC 6598). Without any other test, you already know port forwarding won't help.
If there are two routers: the provider's ONT and your own
This layout is very common in Indonesian fibre homes. The provider's ONT, such as a ZTE F609 or F670L, Huawei HG8245H, or Fiberhome HG6243C, still works as a router, and behind it sits a Wi-Fi router you bought yourself. Your router's WAN address then starts with 192.168.x.x, because it gets its address from the ONT.
In this layout, requests from outside have to pass two doors. There are two ways to deal with it:
- Forward twice. On the ONT, create a rule forwarding the port to your router's address. On your router, create a rule forwarding the same port to the target device. Give both fixed addresses.
- Put the ONT in bridge mode. Ask the provider to switch the ONT to bridge, so your router does the PPPoE login and receives the public address directly. The rule then only needs creating once, on your router.
The first needs no call to anyone but is easier to get wrong. The second is tidier, and also removes the double NAT that can slow online games and video calls.
The configuration steps
If you do have a public address, continue:
- Give the target device a fixed address. This is mandatory. If its address changes after the router restarts, your rule points at the wrong device. Find the DHCP Reservation menu and tie the device's MAC address to one fixed address.
- Find the port number the device uses. It's in the manual or its settings. Security cameras typically use 554 for the video stream and 80 for the interface page.
- Open the port forwarding menu on the router. It may be called Virtual Server, NAT Forwarding, or Port Mapping depending on the brand.
- Fill in the rule: external port, destination address, internal port, and TCP or UDP protocol.
- Test from outside the home network. Turn off Wi-Fi on your phone and use mobile data. Testing from inside often gives misleading results.
Why is testing from inside misleading? When you open your own public address from inside the network, the request has to go out and turn back into the same router. Many ONTs and cheap routers don't support this loop (often called NAT loopback or hairpinning). The result fails even though the rule already works from outside. Conversely, some routers do support it, so an inside test succeeds while the provider blocks it from outside. Mobile data avoids both traps.
If the public address keeps changing
The public address on a home subscription is usually dynamic, changing every few days or every time the modem restarts. The port forwarding rule still applies, but you no longer know which address to contact.
DDNS solves this. You get a fixed name, and the router updates that name whenever the address changes. Most routers include a built-in DDNS menu with several free providers.
Risks worth knowing
An open port can be found by automated scanners within hours. This isn't an exaggerated warning, there are dedicated search engines that index internet-exposed devices, and security cameras are among their most common contents.
If you still choose to open a port, do these four things:
- Change the device's default password before the port is opened.
- Update its software, and check whether the manufacturer still supports it.
- Use an unusual external port number rather than the default.
- Put that device on a network separate from your work computer, the guide to separating networks.
One absolute rule: never forward port 23 (Telnet). The Mirai botnet spread precisely by scanning ports 23 and 2323, then trying dozens of factory-default password pairs on IP cameras and routers. Shop CCTV DVRs opened up by a technician often fall victim to this, because the password was never changed after installation.
Specific considerations for cameras and smart devices are covered in the smart device security guide.
Three safer alternatives
| Method | Needs a public IP? | Notes |
|---|---|---|
| Manufacturer's cloud service | No | Easiest, but data passes through a third party |
| VPN into your home | Yes | One controlled door instead of several open ones |
| Reverse tunnel | No | Works behind CGNAT, needs setup |
For most household needs, viewing a camera from outside, the manufacturer's cloud service is adequate and demands nothing from your network. Port forwarding only becomes genuinely necessary when you run your own service that must be reachable directly.
For reverse tunnels, two widely used examples: Cloudflare Tunnel, which only makes an outbound connection from your device to Cloudflare so no inbound port or public IP is needed, and mesh VPNs such as Tailscale, which try to traverse NAT directly and fall back to a relay server when they can't. Both work behind CGNAT.
Example: a shop owner who wants to watch the DVR from home
| What you find | Sensible next step |
|---|---|
| The shop router's WAN address is between 100.64.x.x and 100.127.x.x | Use the DVR brand's own cloud app, or ask the provider for a public IP |
| WAN address 192.168.x.x, with an ONT plus your own router | Check the WAN address on the ONT first. If it's public, forward twice or put the ONT in bridge mode |
| WAN address matches the "what is my IP" result | Port forwarding can work, but change the DVR password, update firmware, and use an unusual external port |
| The technician offers to "just open DMZ, it's easier" | Decline. DMZ exposes every DVR port to the internet |
For most shops and homes, the camera brand's own cloud app is the safest starting point. Port forwarding is only worth considering when that app doesn't exist or falls short.
Read also: What DDNS Is and When You Need It.
Frequently asked questions
Why doesn't it work even though my port forwarding is correct?
Most often because your subscription doesn't give you a real public IP address, but one shared among many customers via CGNAT. In that situation no router setting can help, because requests from outside never reach your router at all.
How do I know whether I have a public IP?
Compare the WAN address shown on your router's page with the address that appears when you search "my IP" in a browser. If they match, you have a public address. If they differ, your connection sits behind CGNAT.
Is opening a port dangerous?
There is a risk. An open port can be found by automated scanners within hours. A device with a weak password or outdated software behind an open port is one of the most frequently used ways in.
Is there a safer approach than port forwarding?
Yes. Most modern cameras and storage devices offer access through the manufacturer's cloud service with no ports opened at all. Another option is a VPN into your home, which opens one controlled door instead of several open ones.
My router's WAN address starts with 100.7x, what does that mean?
Addresses from 100.64.0.0 to 100.127.255.255 are shared address space reserved for CGNAT. It means your connection shares a public address with other customers, and port forwarding on your router can't be reached from outside. Your options: ask the provider for a public IP, or use the manufacturer's cloud service or a reverse tunnel.