NVRs are typically designed to act as a firewall between cameras and the 'public' side.
To be brutally honest - security has not been a strong point in the design of most NVR or camera firmware.
Check out the many vulnerabilities that have been discovered and continue to be exploited across many brands and models.
This means that NVRs do not provide routing functionality between the camera LAN and the public LAN.
Actually they do. Which you confirm below :
When you say 'Public LAN' I presume you mean the LAN that the NVR LAN interface is connected to.
That's the Private LAN.
The Public LAN is the internet.
How do you think Hikvision's 'Virtual Host', or Dahua's equivalent work?
How is the camera web GUI reached via the NVR LAN interface?
The Linux kernel provides a routing capability between the camera and NVR interfaces.
Routing functionality is required when you need to change one IP address to another. In order for, say, a PC connected to one LAN subnet (e.g. 198.168.1.0/24) to communicate with a device that is connected to a different LAN subnet (e.g. 10.1.1.0/24 – the camera subnet), a routing capable device must be connected between the two subnets, ie., the NVR. The NVR belongs to both subnets, its router has one IP address in the subnet associated with the public LAN port and another in the subnet that is associated with the camera LAN ports. If you have an Internet gateway router connected to the PC's subnet, then the default gateway address of the PC would be the address of the internet gateway router. In order for the PC to get through to addresses in the camera subnet, the subnet address information would need to be present in either the internet gateway router's route table or in the PC's route table. The only way it would get into that table is if it was advertised by the NVR using a protocol such as RIP or if a static route had been configured. (e.g. PC on 192.168.1.2 wants 10.1.1.1, doesn't have that subnet range in it's route table so sends it to default gateway, 192.168.1.1 which is the internet router. Internet router sees it has a route table entry that directs it to send all 10.1.1.0/24 addresses to 192.168.1.3, the address of the NVR. NVR receives packet for 10.0.0.1 and checks its route table, finds a match to the camera subnet then sends the packet to the appropriate camera (or broadcasts it to all cameras if it doesn't already have an IP address to MAC address mapping.
Yes, that's mostly all correct.
All you need to do to access cameras on an NVR PoE interface network is to tell the LAN default gateway how to route the traffic.
And have ip_forward enabled (ie Virtual Host or equivalent) on the NVR.
And as this can be done on any device on the LAN, not just on the LAN gateway, there is no security, certainly no 'firewall' in the NVR.
Here is a Hikvsion NVR with Virtual Host enabled :
Code:
alastair@PC-I5 ~ $ ssh root@192.168.1.213
root@192.168.1.213's password:
[root@dvrdvs /root] # cat /proc/sys/net/ipv4/ip_forward
1
[root@dvrdvs /root]
# exit
Connection to 192.168.1.213 closed.
alastair@PC-I5 ~ $
Disable Virtual host, and the ip_forward value changes to 0