How to make camera have access to the internet through NVR POE and send e-mails from the camera?

MerNion

Young grasshopper
Joined
Nov 5, 2016
Messages
55
Reaction score
4
I have a DS-2CD2342WD-I camera connected to a DS-7608NI-I2 NVR through the POE port #1.

NVR LAN network settings:
DHCP Off
192.168.0.100
255.255.255.0
192.168.0.1
DNS: 192.168.0.1 and 8.8.8.8
Internal NIC ip: 192.168.254.1 (default)
Virtual host enabled (I can access the camera as 192.168.0.100:65001)

Camera:
DHCP off
192.168.254.2 (default)
255.255.255.0
192.168.254.1
DNS: 192.168.0.1 and 8.8.8.8

So when I go to the camera (through 192.168.0.100:65001) NTP setting to test the connection of the camera with the outside world I get a failute.. Even with domain name or IP address of a NTP server..
Which means that the camera can't reach the internet for some reason..

Any idea why such a simple network connection would fail?

Thanks
 

drew91101

Getting the hang of it
Joined
Oct 2, 2016
Messages
170
Reaction score
44
Location
NJ
Not the greatest with networking but your primary DNS is the same as your ip of the NVR. Try putting in the IP address of the NTP server rather than time.windows.com and see if it works. Using port 123?
 

MerNion

Young grasshopper
Joined
Nov 5, 2016
Messages
55
Reaction score
4
Having DNS as 192.168.0.1 would be no problem if the NVR system works as designed, it would just lookup the domain name on 192.168.0.1.. The problem is not domain resolution as with IP on the NTP it still fails.
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,963
Reaction score
6,794
Location
Scotland
Not the greatest with networking but your primary DNS is the same as your ip of the NVR.
With apologies - I don't think so - I think the 'default gateway' label is just missing from the NVR settings list.

Which means that the camera can't reach the internet for some reason..
Your settings look OK to me.
I suspect that what is missing is the 'static route' in your LAN gateway/router that says something like:
"For network 192.168.254.0 mask 255.255.255.0 use the NVR LAN address of 192.168.0.100 for the gateway"

The way to check, before and after, on a PC is something like
tracert 192.168.254.2
and watch the hops that the traffic uses, in the middle should be your NVR LAN interface IP address 192.168.0.100
 

MerNion

Young grasshopper
Joined
Nov 5, 2016
Messages
55
Reaction score
4
That worked! :) Thanks!
So the camera was trying to contact the internet but then the reply didn't know where to go... I knew i wasn't good in networking :p
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,963
Reaction score
6,794
Location
Scotland
So the camera was trying to contact the internet but then the reply didn't know where to go...
Spot on!
I knew i wasn't good in networking
Well, you did manage to set the camera default gateway correctly, presumably changing it from the NVR LAN interface default gateway setting that the NVR applies.
Which if you don't have the NVR channel for the camera set to 'Manual' instead of 'Plug&Play' it will sneakily change back at some point ...
 

MerNion

Young grasshopper
Joined
Nov 5, 2016
Messages
55
Reaction score
4
So I managed to have internet on the camera, now any idea why the camera might not send out e-mails? :)
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,963
Reaction score
6,794
Location
Scotland
Well, there is a lot of that about, especially on the NVRs with older firmware that's not kept up with stricter security and privacy measures imposed by email providers.
The reasons are many and varied - all I can suggest is to give some (redacted) settings details and see who has been through the same problem.
 

MerNion

Young grasshopper
Joined
Nov 5, 2016
Messages
55
Reaction score
4
But I try to send e-mail directly from the camera, not through the NVR's e-mail function.. Aren't these 2 separate functions?
As for the camera, we made sure it is connected to the internet and the dns resolution is working since the NTP test was successful with a domain name.

I also tried to put as SMTP server one of my network routers which has a packet sniffer function and I saw that the 192.168.254.2 (the camera) tried to open the port 25 on the router. Which means that at least it is trying to connect to the SMTP. The problem is why it is failing on a normal SMTP server on port 25 with no TLS/SSL etc..

The settings I have for the mail are pretty basic:
Sender: My name
Sender's e-mail address: camera@mydomain.com
SMTP Server: mail.mydomain.com
SMTP Port: 25
E-mail Encryption: None
Authentication Username: admin@mydomain.com
Authentication Password: the_admin_mail_password
Receiver1: Name, admin@mydomain.com

I hit "test" and it says "Testing failed" :(
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,963
Reaction score
6,794
Location
Scotland
But I try to send e-mail directly from the camera, not through the NVR's e-mail function.. Aren't these 2 separate functions?
Yes, they are, I was just using that as an example. There has been a load more discussion on email problems with NVRs than with cameras.
Separate development teams - the camera teams do seem more tech-savvy, much more sophisticated in the content of their code. The NVR teams seem a bit set in their ways, having to focus more on functionality.

The problem is why it is failing on a normal SMTP server on port 25 with no TLS/SSL etc..
On your example - are there any SMTP servers left that would accept such a plain-text access? Including the credentials? Is it a fictitious or real example?
one of my network routers which has a packet sniffer function
Quite a hard way to figure the cause - but you'd need to sniff traffic sent to a real SMTP server to figure out the cause.
Though with that plain-text attempt, you'd probably see what was actually happening.
When I looked at why gmail started failing, a few months back, I did find that on the NVR the serial console provided some debug info from the use of the test button.
 

MerNion

Young grasshopper
Joined
Nov 5, 2016
Messages
55
Reaction score
4
After 2 hours of testing which involved packet sniffing, a setup of an SMTP dummy server on my laptop and a real SMTP with TLS that I could use to debug I found that there is nothing wrong with the camera or the NVR.. I don't know if I should laugh or cry.. The problem is the ports that the original mail server was using.. I had to try all possible combinations with/without encryption, with/without TLS/SSL and with/without STARTTLS to finally find out that I had to have port 465, encyption TLS, and without checking the "Enable STARTTLS" to work (on the camera) and port 465, with "Enable SSL" checked (on the NVR). I can now go to sleep for tonight!
Thanks all for the time and effort!
 
Top