Hikvision cameras connected to nvr to send direct email

johnfsd

n3wb
Joined
Sep 29, 2016
Messages
15
Reaction score
1
Hi all, I finally managed with the help of this forum and the great users, and the support of hikvision to setup my DS-7608NI-E2/8P/A and DS-2CD2142FWD-IS cameras and got the NVR to send email alerts.

However the images the NVR send are such poor quality, if the nvr was stolen i would be left with emailed images that look like screen shots from minecraft lol.

What i am trying to achieve now is for the current setup to continue working but to have the cameras individually configured to send email alerts, as they can be setup to send better quality images (why the NVR doesn't have this option i have no idea).

My issue is that after enabling virtual host i can login to the cameras direct and configure the email settings (the same as the NVR) but had an error "The network gateway is not configured, and this may cause the failure of email sending". I then found there was no ipv4 default gateway in network settings of the camera so put this in 192.168.0.1 but now the email test still fails.

I have read some other threads which seem slightly related but struggled to understand some of the instructions. from what i understood this is an issue with the cameras working on the nvr and not being connected direct on the lan and they need to be configured some how using ip forwarding? to be honest i just dont know where to begin.

If any one can help it would be great or if any further information is required to be able to provide the help please let me know.
 

Securame

Pulling my weight
Joined
Mar 25, 2014
Messages
664
Reaction score
214
Location
Barcelona, Spain
However the images the NVR send are such poor quality, if the nvr was stolen i would be left with emailed images that look like screen shots from minecraft lol.
If that is what worries you the most, put a micro SD cards on the cameras, so if the NVR is stolen you will have a copy on the cameras of the last recordings.
 

johnfsd

n3wb
Joined
Sep 29, 2016
Messages
15
Reaction score
1
That would have been an idea, but the cameras are low down so I'd rather have the email option if I can get the thing working.
 

Sep

n3wb
Joined
Jan 5, 2018
Messages
12
Reaction score
2
Resurrecting an old thread...

I have my cameras connected to an NVR (DS-7716NI-I4/16P). I have enabled Virtual Host so now I can connect to the camera GUI directly.
My question is can I set up the cameras to connect directly to the Internet so they can send their own email alert directly from the camera?

Thank you!
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,980
Reaction score
6,802
Location
Scotland
Access from the LAN using their native address, or via Virtual Host? Not the same thing.

Yes, you can get the cameras to access the internet to send emails.

The NVR PoE interface IP address needs to be set as the camera gateway, and the 'static route' added to your LAN gateway.
As per the referenced post.
 

Sep

n3wb
Joined
Jan 5, 2018
Messages
12
Reaction score
2
Virtual Host is working fine and I can access the cameras from the LAN.
My question is can I have the cameras access the Internet directly (through the NVR)?
You are absolutely correct... the post you had referenced had the answer. Shame on me for not reading it thoroughly the first time. Thank you!

In short, the steps are:
- Activate Virtual Host on the NVR.
- Set the camera default gateway to the IP address of the NVR PoE interface. By default this is 192.168.254.1 To make it permanent, the NVR channel has to be set to 'Manual' mode, not Plug&Play. Otherwise the NVR will overwrite the IP settings on the cameras.
- There needs to be a static route defined in the LAN gateway/router (or the PC networking if the LAN has no gateway) to specify where to direct packets that must reach the NVR PoE IP segment.
Something like "For network 192.168.254.0/24 (ie subnet mask 255.255.255.0) use <NVR_LAN_interface_IP_address 192.168.1.230> as the gateway."
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,980
Reaction score
6,802
Location
Scotland
You are absolutely correct... the post you had referenced had the answer.
Yes, it's just a routing configuration.
The Virtual host facility implicitly enables the kernel 'IP_forward' feature between the 2 NVR interfaces. (Not to be confused with port-forwarding).
And the camera's kernel needs to have a valid gateway to forward packets outside it's own subnet. Not the gateway the NVR assigns in Plug&Play. Though I've never figured if that is deliberate or an oversight.
 

BCrippsy38

n3wb
Joined
Mar 29, 2015
Messages
7
Reaction score
2
Yes, it's just a routing configuration.
The Virtual host facility implicitly enables the kernel 'IP_forward' feature between the 2 NVR interfaces. (Not to be confused with port-forwarding).
And the camera's kernel needs to have a valid gateway to forward packets outside it's own subnet. Not the gateway the NVR assigns in Plug&Play. Though I've never figured if that is deliberate or an oversight.
any chance you could explain the third step further? I'm not a noob with networking but haven't dealt with static routes.
On my linkseys router it asks for destination IP, Subnet mask, Gateway, and interface. what address is used for the gateway, a new open IP? and the destination IP, is that NVR interface 192.168.254.1? interface is either LAN/wireless or Internet, I'm using LAN/wireless.

Any help is greatly appreciated.
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,980
Reaction score
6,802
Location
Scotland
any chance you could explain the third step further?
This step:
- There needs to be a static route defined in the LAN gateway/router (or the PC networking if the LAN has no gateway) to specify where to direct packets that must reach the NVR PoE IP segment.
Something like "For network 192.168.254.0/24 (ie subnet mask 255.255.255.0) use <NVR_LAN_interface_IP_address 192.168.1.230> as the gateway."
On my linkseys router it asks for destination IP, Subnet mask, Gateway, and interface.
The 'Destination IP' is the network address of the network that you want to set the route up for - usually 192.168.254.0
The subnet mask, as always, defines the scope of the network, in this case 255.255.255.0
The Gateway is where you want the router to direct the traffic for the destination network.
In this case - it needs to be directed to the LAN interface (not the 192.168.254.1 POE interface) IP address of the NVR, so that the NVR can forward it on internally to its POE interface where the cameras are.
interface is either LAN/wireless or Internet, I'm using LAN/wireless.
LAN/wireless makes sense. The cameras are on the NVR which is on your LAN, after all.

what address is used for the gateway, a new open IP?
Nope - it needs to be the gateway address through which the destination network is reached, as explained above.

I hope that makes sense.
Good luck - it will be fine.
 

BCrippsy38

n3wb
Joined
Mar 29, 2015
Messages
7
Reaction score
2
Thanks for the quick response alastair!! static routing makes a lot more sense, I think I understand the concept now.
That being said I still can't get the camera to send a test email successfully.
-Virtual Host is enabled
-all the camera IPs are manual mode not plug and play.
-camera default gateway is 192.168.254.1. (cameras are 192.168.254.2-.9)
-now have the static route configured:
destination IP = 192.168.254.0
subnet mask = 255.255.255.0
gateway = LAN IP of NVR 192.168.x.1xx

only thing i can think of is the DNS server for the camera, what should that be set too? 192.168.254.1?
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,980
Reaction score
6,802
Location
Scotland
only thing i can think of is the DNS server for the camera, what should that be set too? 192.168.254.1?
No - that is the NVR POE interface - it does not do DNS lookups.
Generally you'd use your LAN router IP address for DNS, or maybe the Google DNS of 8.8.8.8 that Hikvision devices seem to like.

The email Test button could fail if the routing is not working as intended, or if DNS name resolution is not working.
So it would be good to check the basic routing first, independent of DNS.

Suggestion:
On the problem with the network routing configuration, try a couple of things from a PC on the LAN -
ping 192.168.254.1
ping192.168.254.2
And you can use this command to show if the traffic is flowing as intended -
tracert 192.168.254.1
 

BCrippsy38

n3wb
Joined
Mar 29, 2015
Messages
7
Reaction score
2
No - that is the NVR POE interface - it does not do DNS lookups.
Generally you'd use your LAN router IP address for DNS, or maybe the Google DNS of 8.8.8.8 that Hikvision devices seem to like.

The email Test button could fail if the routing is not working as intended, or if DNS name resolution is not working.
So it would be good to check the basic routing first, independent of DNS.
I figured as much, i have been using my LAN router IP and the alternative is the google DNS.

Suggestion:
On the problem with the network routing configuration, try a couple of things from a PC on the LAN -
ping 192.168.254.1
ping192.168.254.2
And you can use this command to show if the traffic is flowing as intended -
tracert 192.168.254.1
seems to me the static routing is working based on the successful pings, see attached. Same email credentials being used in the NVR are being used for the cameras, so i doubt its my email settings.
 

Attachments

BCrippsy38

n3wb
Joined
Mar 29, 2015
Messages
7
Reaction score
2
well i got it working, for some reason if I don't use SSL encryption it works. whats odd is it still uses the SSL 587 port.

Thanks for all the help with the static routing help!!
 

sominaik

n3wb
Joined
Jan 28, 2020
Messages
4
Reaction score
0
Location
Melbourne, Australia
Hi guys,

This is a great thread and using that I configured my Hikvision Cameras (connected to NVR) to send direct emails with pictures almost an year ago.
2 days, I have changed my router .. followed all the instructions again and can confirm the following:-
1- Virtual host enabled (can access the cameras via web)
2- TCP/IP settings confirmed in the Cameras (in fact, they remain the same)
3- static route added in the router (seems to be working as i can successfully ping the cameras from pc on the LAN)

But, still email testing is FAILING ... please guide me
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,980
Reaction score
6,802
Location
Scotland
static route added in the router (seems to be working as i can successfully ping the cameras from pc on the LAN)
As a further confirmation - can you access the cameras web GUI at their actual IP address from a PC on the LAN?
Does the NVR have a static IP address configured?
Is the new router IP address the same as the old one?
If not - did you change the default gateway as set in the NVR network config?
**edit* And the camera and NVR DNS settings if they point to the old router IP address which is now different for the new router.
 
Last edited:

sominaik

n3wb
Joined
Jan 28, 2020
Messages
4
Reaction score
0
Location
Melbourne, Australia
Thanks for your prompt reply.
1 - Yes.. I can access direclty using camera IP address
2- Yes it is static ( i can access nVR as well)
3- Same router IP

I can access the local FTP both using local IP address & DDNS domain. So seems like static routing is working for FTP

EDIT : I have been using Google DNS in the NVR and Cameras, which remain the same. Anyway, double checked them and they are OK
 
Last edited:

BCrippsy38

n3wb
Joined
Mar 29, 2015
Messages
7
Reaction score
2
Sounds like the issue is with the smtp server settings or credentials. are you using a gmail smtp server?
 
Top