In most installations, remote access to a camera system is turned on with a single click: “P2P” or “cloud” is ticked in the NVR menu, an app is installed on the phone, and video comes through. The same click connects the camera network to a third-party service outside the organization’s security policy. Below, manufacturer P2P cloud services, port forwarding, VPN and VMS gateways are compared in terms of attack surface, authentication, logging and manageability, and a decision tree is given for corporate environments.
Remote access methods and how they work
- Port forwarding: An external port on the firewall is forwarded to the web, RTSP or manufacturer SDK port of the NVR or camera. The device becomes directly reachable from the internet.
- Automatic port opening via UPnP: The device creates the port forward itself using the router’s UPnP IGD service. Since nobody wrote a rule deliberately, usually nobody notices.
- P2P cloud service: The NVR or camera opens a persistent outbound connection to the manufacturer’s servers and registers with its serial number. The mobile app finds the device through the same server; the connection is set up directly via NAT traversal or through the manufacturer’s relay server. No inbound rule is needed on the firewall.
- Remote access VPN: The user first connects to the corporate VPN, then reaches the server on the internal network with the VMS client.
- Site-to-site VPN: A permanent encrypted tunnel between a branch and the central monitoring room.
- VMS gateway: The mobile/web server component of an enterprise VMS is published in the DMZ; the user accesses only this component, after authentication. Cameras and recording servers are never visible from outside.
Risks of P2P cloud services
P2P services technically work and are designed for consumer use. The problem in a corporate environment is the architecture:
- Connections outside policy: Because the device opens an outbound connection, inbound traffic rules on the firewall don’t come into play. If egress from the camera network to the internet is open, an external access path forms without the organization knowing. There’s no hole in the wall, but the door is open.
- Authentication with a third party: Access depends on the password of the manufacturer cloud account and that account’s security. The corporate directory, MFA policy and account closure processes don’t apply to these accounts; access on a departing employee’s phone doesn’t close by itself.
- No central log: Who accessed which camera and when doesn’t reach the organization’s log system. In environments that require an audit trail for recording access, this is a direct compliance problem.
- Data flow and location: Which countries’ servers the video passes through via the relay isn’t under the organization’s control; a legal assessment may be needed regarding personal data transfer.
- Dependency: The service’s security and continuity, and vulnerabilities in the software component on the device that talks to this service, aren’t under the organization’s management.
Why port forwarding is unacceptable
The embedded web servers and manufacturer protocols of cameras and NVRs have repeatedly made the news with critical vulnerabilities such as authentication bypass and command injection; some of these vulnerabilities are in CISA’s Known Exploited Vulnerabilities (KEV) catalog. A camera port exposed to the internet is quickly found by bots that scan constantly. With port forwarding, security rests entirely on the device’s built-in authentication and patch level; brute-force protection, MFA and central logging are either missing or limited on most devices. It’s also the gap we come across most in site audits: a NAT rule opened “temporarily” during installation and then forgotten. The temporary rule becomes permanent. So in a corporate environment, direct port forwarding to a camera or NVR, including for temporary installations, shouldn’t be accepted. For tracking and prioritizing vulnerabilities, see the camera and NVR vulnerability tracking article.
VPN and VMS gateway architectures
Remote access VPN is the most common corporate solution. When set up correctly, the user is authenticated with their corporate identity and MFA, and a rule is written for the VPN user group that allows only the VMS server’s client ports. No direct access to the camera VLAN is given from the VPN pool; the user connects to the VMS, not the camera. A common mistake is giving VPN users access to the whole internal network. Then a single compromised VPN account reaches the camera network directly. General controls for corporate VPN are explained in the corporate VPN security controls guide.
In the VMS gateway architecture, the mobile/web component runs in the DMZ, with a TLS-terminating reverse proxy or web application firewall in front of it. The gateway takes the stream from recording servers on the internal network and relays it to the user; the user has no network-level access to the internal network. Authentication is tied to the corporate directory and MFA is applied. This model suits mobile devices that can’t install a VPN client and third parties such as an external security company; the contractual and permission aspects of third-party access are covered in the camera access by private security companies and third parties article.
Site-to-site VPN connects branches to the central monitoring room. Only the necessary flows are allowed in the tunnel (between the central VMS and the branch recording server); branch cameras’ internet egress stays closed. If the tunnel is opened “any-any”, a branch camera becomes a back door into the center.
Comparison table: security, management, cost items
| Method | Attack surface | Identity and MFA | Central logging | Cost item |
|---|---|---|---|---|
| Port forwarding | Device directly on the internet | Device password | None/limited | None; high risk cost |
| P2P cloud | Manufacturer cloud and device component | Manufacturer account | Not at the organization | Usually free |
| Remote access VPN | VPN gateway | Corporate identity + MFA | Yes | Existing VPN infrastructure, client management |
| VMS gateway | Gateway in the DMZ | Corporate identity + MFA | Yes (VMS audit trail) | VMS license, DMZ server, certificate |
| ZTNA | No externally open ports | Identity + device posture | Yes | Subscription |
Run the decision tree in this order:
- Is remote access really necessary, or is a central monitoring room enough? If it isn’t needed, close the camera network’s internet egress completely.
- Do the users who need access use corporate devices? If yes, a remote access VPN or ZTNA; the user is authorized only for the VMS.
- Are there mobile users on non-corporate devices, or third parties? A VMS gateway, MFA and per-camera permissions.
- Will branch recordings be viewed from the center? Site-to-site VPN with rules that allow only VMS flows.
- Port forwarding and P2P cloud are never used; if a product works only with P2P, its suitability for corporate use is reassessed.
ZTNA can replace VPN in this tree: the user is authorized at the application level (only for the VMS), not at the network level, and device posture also goes into the access decision. Whichever model is chosen, the principle that doesn’t change is this: cameras and recording servers are never directly reachable from the internet under any circumstances.
Detecting and disabling P2P and UPnP
Detection and disabling happen at three layers. Turning it off only in the device menu isn’t enough; a firmware update or factory reset can quietly turn P2P back on. That’s why the network layer is closed too:
- Device setting: As the first step of IP camera and NVR hardening, disable the P2P/cloud service and UPnP on every device. The menu name varies by manufacturer (“P2P”, “Platform Access”, “Cloud”, “UPnP”); verify on all devices with a bulk configuration tool.
- Router/firewall: Disable the UPnP IGD service, list existing automatic port forwards and delete them. If the miniupnpc client is installed, the table of the UPnP router on the network can be listed with
upnpc -l. - Network policy: Block internet egress from the camera VLAN by default; allow only the internal NTP server and, if needed, the internal DNS server. Log blocked egress attempts. A P2P client that hasn’t been disabled shows up in these logs as repeated connection attempts to the manufacturer’s server addresses; the firewall log is a more honest inventory than the menu.
Nmap can be used to find devices responding to UPnP with a network scan:
# Devices in the camera VLAN responding to SSDP/UPnP
sudo nmap -sU -p 1900 --script upnp-info 10.20.0.0/24
# Open port check from outside (from a point outside the organization, for your own external IP)
nmap -Pn -p 80,443,554,8000,8080,37777 <external-ip-address>
The port list in the second command is an example; take the ports your own devices use from the inventory. Run the external scan only against your own IP addresses. To work out the full list of allowed flows on the camera network, you can use the IP camera port, protocol and ACL matrix guide.
Mobile client and MFA requirements
- Mobile access only with corporate identity and MFA; no shared “security” account is used. A shared account’s log points to nobody.
- Per-user camera and function permissions: live viewing, playback and export are separate permissions; export on mobile is kept off for most users.
- Session timeouts and the ability to revoke a session centrally if a device is lost.
- Where possible, devices with an up-to-date operating system under mobile device management (MDM).
- All access sent to the VMS audit trail and the organization’s log system; access permissions reviewed periodically.
For remote access design, NIST’s guide to enterprise telework and remote access security, SP 800-46 Rev. 2, provides a general framework. For an access architecture and migration plan specific to your camera system, see the secure remote camera access service page; for other device hardening topics, see the IP camera and NVR cybersecurity checklist article.
Frequently asked questions
Why isn’t camera P2P cloud access recommended in a corporate environment?
Because the device opens an outbound connection to the manufacturer’s server, firewall policy doesn’t come into play; authentication is tied to the manufacturer account instead of the corporate directory and MFA, and access logs don’t reach the organization’s log system. P2P should be disabled in a corporate environment.
Can access to an NVR via port forwarding be secure?
It shouldn’t be accepted in a corporate environment. Security rests entirely on the device’s built-in authentication and patch level; camera ports exposed to the internet are quickly found by automated scans, and critical vulnerabilities in these devices have been exploited many times in the past.
Should VPN or a VMS gateway be chosen for remote access to the camera system?
For staff using corporate devices, a remote access VPN or ZTNA authorized only for the VMS. For mobile users who can’t install a VPN client and third parties, a VMS gateway published in the DMZ with MFA is a more controlled option.
How can you tell whether there are cameras using P2P or UPnP on the network?
Internet egress from the camera VLAN is blocked and blocked connections are logged; P2P clients left enabled show up as repeated connection attempts to manufacturer servers. The router’s UPnP port mapping table is also examined and the camera VLAN scanned for UDP port 1900.