Cameras keep disconnecting from NVR every 24h

HikVis999

n3wb
Oct 17, 2022
2
0
f
I have two Hikvision cameras set up at a remote location. They are port forwarded with dynamic DNS, which updates every 15 minutes. The WAN IP of this location changes every 24h.

On my local Hikvision NVR, I have added these two cameras using rtsp through the dynamic DNS domain. The problem is that these cameras disconnect every 24h. The only way I can get them back up is to reboot the NVR.

I'm not sure why this is happening. Maybe the NVR DNS cache isn't getting updated? I would assume that it would continue to retry the connection, but I have to manually restart instead.
 
Maybe the NVR DNS cache isn't getting updated?
Perhaps one way to determine that would be to have VLC running on a PC and the RSTP streamed to that PC using the same hostname in the URL.
If the hostname is not being updated as it should be then the PC would also lose its stream also when the WAN IP changes.

BTW, how long have you managed to port forward without getting hacked?
 
I have two Hikvision cameras set up at a remote location. They are port forwarded with dynamic DNS, which updates every 15 minutes. The WAN IP of this location changes every 24h.

On my local Hikvision NVR, I have added these two cameras using rtsp through the dynamic DNS domain. The problem is that these cameras disconnect every 24h. The only way I can get them back up is to reboot the NVR.

I'm not sure why this is happening. Maybe the NVR DNS cache isn't getting updated? I would assume that it would continue to retry the connection, but I have to manually restart instead.

If you enable SSH on your NVR (just for local LAN), and login you should be able to access the ping command.

Start the NVR, login to SSH (root:<admin password>) and ping the ddns FQDN
Once WAN IP changes, and waiting for 15 minutes or so, repeat the ping and see if the ddns resolves to the updated IP.

That should at least test the DNS cache.
 
  • Like
Reactions: alastairstevenson
BTW, how long have you managed to port forward without getting hacked?
I'm not sure what you mean. Only the RTSP is port forwarded and the streams are password protected. I haven't been hacked as far as I'm aware. Is there some other risk I should be aware of?
If you enable SSH on your NVR (just for local LAN), and login you should be able to access the ping command.

Start the NVR, login to SSH (root:<admin password>) and ping the ddns FQDN
Once WAN IP changes, and waiting for 15 minutes or so, repeat the ping and see if the ddns resolves to the updated IP.

That should at least test the DNS cache.
Thanks, I'll give it a shot.

Edit: The cameras disconnected again and I did as you said. The ping command is showing the updated IP, so it's probably not an issue with the DNS cache. I'm really not sure what else the issue could be. Under the status column, the cameras are showing as 'Offline(IP Camera exception)'. The cameras are reachable just fine from my PC.
 
Last edited:
I'm not sure what you mean. Only the RTSP is port forwarded and the streams are password protected. I haven't been hacked as far as I'm aware. Is there some other risk I should be aware of?

Thanks, I'll give it a shot.

Edit: The cameras disconnected again and I did as you said. The ping command is showing the updated IP, so it's probably not an issue with the DNS cache. I'm really not sure what else the issue could be. Under the status column, the cameras are showing as 'Offline(IP Camera exception)'. The cameras are reachable just fine from my PC.

I suspect the NVR resolves the domain name when it first starts, and just stores the IP and never resolves it again even if connection is lost.

This is just guesswork on my part.

It might be possible to schedule a device reboot just after the ddns IP changes, or script an automated config change to force the unit to resolve to the new IP at the right time.

Or I am wrong and someone who actually uses an NVR similar to yours can chime in.

Might be worth posting the NVR model and firmware version/date you are on.
Also may be worth checking out any patch notes of firmware updates (if available).
 
  • Like
Reactions: Flintstone61
I'm not sure what you mean. Only the RTSP is port forwarded and the streams are password protected. I haven't been hacked as far as I'm aware. Is there some other risk I should be aware of?

Thanks, I'll give it a shot.

Edit: The cameras disconnected again and I did as you said. The ping command is showing the updated IP, so it's probably not an issue with the DNS cache. I'm really not sure what else the issue could be. Under the status column, the cameras are showing as 'Offline(IP Camera exception)'. The cameras are reachable just fine from my PC.
When the connection lost (IP changed), did you try to delete and re-add the camera?
 
most nvr's ive seen have an option to reboot on a schedule,