Dahua - P2P Services & Ports
Dahua's P2P protocol allows remote access to NVRs and cameras without needing to configure port forwarding on a router. It is well suited to smaller installations where a dedicated network administrator is not available. However, P2P will not function in all network environments — particularly where a firewall is filtering outbound traffic
Dahua's P2P protocol provides remote access to NVRs and cameras without requiring router configuration or port forwarding. While well suited to smaller installations, P2P depends on outbound connectivity to Dahua's cloud infrastructure — and will fail silently when a firewall restricts that traffic. This article explains how the protocol works and what needs to be opened to restore it.
How P2P Establishes a Connection
When a connection is initiated, a Dahua mediator server evaluates the network topology and selects the most appropriate connection method. There are three possible outcomes:
- Same local network A direct local link is established. No cloud involvement required.
- One side behind NAT The party behind the NAT actively establishes an outbound connection to the other party.
- Both sides behind NAT Both parties connect outbound to a Dahua relay server, which brokers the session between them.
In all cases, the outbound connection is assigned a random UDP port at runtime. This means outbound UDP traffic cannot be filtered selectively — all outbound UDP must be permitted.
When P2P Will Not Work
P2P will fail when a firewall is filtering outbound traffic before it reaches the internet. This is most common in two situations: a hardware firewall appliance with strict outbound rules, or a carrier-managed firewall used to interconnect multiple sites over a VPN.
In either case, the ports and domains listed below need to be explicitly permitted for P2P to function.
Required Ports
The following ports must be open for outbound traffic from the NVR to Dahua's P2P servers.
| Service | Port(s) | Protocol |
|---|---|---|
| P2P Relay Service | 8900–8903 |
TCP |
| P2P Server Service | 8800–8803 |
TCP / UDP |
| P2P AS Service | 12366 |
TCP |
| Web Service | 80 or 443 |
TCP |
| GMS Service | 8180 |
TCP / UDP |
| P2P connection traffic | All ports | UDP |
Server Domains
Ensure the following domains are reachable from the NVR. These are the servers responsible for P2P relay and session brokering.
www.easy4ipcloud.comwww.easy4ip.com
If P2P Cannot Be Used
If permitting all outbound UDP is not possible under your organisation's security policy, P2P is not a viable option. The recommended alternative is direct access via port forwarding — configure the relevant ports on the router and access the NVR using its public IP address or a DDNS hostname. This removes the dependency on Dahua's P2P infrastructure entirely and gives you full control over access.