There are 2 remote objects with Video surveillance systems.
Object #1. Router Mikrotik RB3011 (Ver 6.42.3), NVR Dahua NVR5232-4KS2 (local IP 192.168.1.60), PPPoE internet (Active fiber), fixed public IP.
Object #2. Router Mikrotik 951G-2HnD (Ver 6.42.3), NVR Dahua NVR2116HS-S2 (Local IP 192.168.1.100), PPPoE internet (GPON), fixed public IP too.
Video surveillance system must be monitored from remote devices (via desktop software Dahua Smart PSS and mobile software gDMSS Plus/Lite)
The object #1 (16 cameras) is working good more than year without any problem with remote access. Cameras are accessible remotely at MAINSTREAM
without any bandwidth issue.
There is Mikrotik Firewall NAT rule for forwarding port 37777 from internet to NVR #1:
chain=dstnat action=netmap to-addresses=192.168.1.60 to-ports=37777 protocol=tcp dst-port=37777 log=no
log-prefix=""
But I have very strange behaviour with remote access at new object #2.
NVR #2 and cameras are working good in local network. Cameras are showing as via browser and as via Smart PSS Software.
For accessing to NVR #2 from Internet I created the similar rule:
chain=dstnat action=netmap to-addresses=192.168.1.100 to-ports=37777
protocol=tcp in-interface=pppoe-out1 dst-port=37777 log=no log-prefix=""
Other rules in Firewall Filter/NAT is very similar for both 2 routers. All routers get Internet by PPPoE from the same provider.
What happens at second (problem) object:
The Smart PSS software at Windows PC shows that remote NVR is connected successfully, I can change any NVR’s settings remotely.
BUT: there is NO video from any cameras: just black screen with long circle progress that ends error message “Search Stream Timeout”.
I can’t get no remote video from any Windows PC, from different hosts. Please note, Smart PSS software can connect to remote NVR #2, but there is no video from cams.
BUT: The only 2 devices that can view remote cameras are my Android Huawei phone and Android Samsung Tab.
At Samsung Tab video shows only if I set SUBSTREAM for Live Preview in gDMSS app settings. There is no video too if I set MAINSTREAM.
When substream (called “extra” in gDMSS app) is showing, I see camera’s bitrate about 145 KB/s.
At Huawei phone video shows as for SUBSTREAM as for MAINSTREAM and camera’s bitrate is about 24-170 KB/s
The encode settings for camera are very common and usual:
MAIN STREAM
Compression H.264H
Smart Codec is OFF
Resolution 1920x1080(1080P)
Frame Rate(FPS) 25
Bit Rate Type VBR
Bit Rate 4096
SUB STREAM
Compression H.264H
Resolution 704x576(D1)
Frame Rate(FPS) 25
Bit Rate Type VBR
Bit Rate 1024
In current moment the only 1 camera is connected to NVR #2.
Internet Bandwidth of problem object is 30 Mbit/s download and 30 Mbit/s upload.
I have no idea for the reasons of the problem. The only thought is that video stream from NVR is shaped somehow by the router.
At this problem object there is OLD Analog 24-channels DVR. This old system has remote access too, by port 5100.
When old system is working I can remotely view all 24 cameras with no problem. So why video stream by port 5100 is not shaped, but video stream by
port 37777 is shaped?
Firewall Filter rules at Object #2:
chain=input action=accept protocol=tcp dst-port=8291 log=no log-prefix=""
chain=forward action=accept connection-state=established,related log=no log-prefix=""
chain=forward action=drop connection-state=invalid log=no log-prefix=""
chain=forward action=drop connection-state=new connection-nat-state=!dstnat in-interface=Ether1-WAN log=no log-prefix=""
chain=input action=accept protocol=icmp log=no log-prefix=""
chain=input action=accept connection-state=established log=no log-prefix=""
chain=input action=accept connection-state=related log=no log-prefix=""
chain=input action=drop in-interface=pppoe-out1 log=no log-prefix=""
NAT rules except mentioned port forwarding rule includes standard masquarade rule:
chain=srcnat action=masquerade out-interface=pppoe-out1 log=no log-prefix=""