SMTP problems with a twist (firewall in play)

Have some questions or having issues with your IP Camera(s), Post them here for the mods and other users to assist you with.
Darryl
Posts: 18
Joined: Tue Jun 21, 2016 11:44 am

SMTP problems with a twist (firewall in play)

Post by Darryl »

Having the same issue others reported with SMTP setup (to Godaddy), but with a twist. TCP/IP settings are all correct (IP address, Netmask, Port, DNS Servers, Gateway). But the email test fails every single time.

Beginning to think this might be a firewall / security configuration issue. The 1080p cams are operating wirelessly (for the moment); all have static IP addresses and are on an inside network segment.

I fully expected the Amcrest Pro View application on iPhone to communicate with the devices (which it does) when the phone was connected to my Wi-Fi router on the same interior segment. What I did NOT expect was opening the application while away from home - connected only to T-Mobile carrier network - and seeing my devices fully operational and streaming to my phone when I thought I was unconnected! I had assumed that I'd need to VPN into my network to connect to the interior segment, at which time it would have the same LAN access as if I were on my home Wi-Fi. That must mean my cams are broadcasting to an intermediate (Amcrest streaming complex, or other infrastructure). This is convenient, but not necessarily what I wanted. I want the streams to be only accessible to my network! How do I do accomplish this?

I could see if the DNS lookup for SMTP host name (handled by DNS servers outside my firewall) is routed through same interface cam is streaming to internet. The lookup would essentially be traversing and reentering the firewall, which is prohibited. Note that all the other devices on my network (mobile phones, Televisions, laptops, servers) have NO trouble originating SMTP with the same parameters that cams are configured with .

Please help if you can; thanks! :?
Darryl
Posts: 18
Joined: Tue Jun 21, 2016 11:44 am

Re: SMTP problems with a twist (firewall in play)

Post by Darryl »

Update to Connectivity Issue:

I now understand why I could "see" the streams on my iPhone (Amcrest View Pro) when I was disconnected from the Wireless Access Point: Its because the devices were configured as point to point (P2P). In other words, user error - read the manual!

That still doesn't explain why the cams can't connect to SMTP. As another "test", I tried using a Yahoo! email account with same result. Something is not allowing the cams to reach the public SMTP server ....
Melvin
Site Admin
Posts: 2210
Joined: Wed Oct 14, 2015 2:20 pm

Re: SMTP problems with a twist (firewall in play)

Post by Melvin »

Hello Darryl,

Just for testing, can you put the camera IP on DHCP and check if it connects to the SMTP server?. It could be that your firewall is blocking outbound traffic to the camera on the SMTP port. In that case you might have to add the cameras IP as an exception in the firewall. Also test a GMAIL address if possible with the below settings.

Smtp port : 465
Encryption: SSL
smtp: smtp.gmail.com

When you use Gmail settings, make sure the two step verification is 'OFF'. Also, there is an option that says 'Less secure apps' and ensure that this setting is 'ON'. These settings are under your gmail account.
Can't find your answer on the forum? Try our Knowledge Base! https://amcrest.zendesk.com/hc/en-us

Image
Darryl
Posts: 18
Joined: Tue Jun 21, 2016 11:44 am

Re: SMTP problems with a twist (firewall in play)

Post by Darryl »

Update on my SMTP Setup issue:

I ran several experiments with multiple cams:
1. place cam on DHCP and configure SMTP to use godaddy, Yahoo and gmail. Fail

2. place cam on Static IP addr (on same inside segment /24 subnet as DHCP) and try same three SMTP setups. Fail

3. place cam on Static IP addr and configure SMTP to access an open Sendmail relay on my DMZ segment (which inside network is permitted to access). Fail.

Question about SMTP Server Name. Is it possible to specify an IP address in that field? That is how I was attempting to contact the Sendmail relay in example 3, above. I don't have name server running on inside.

Another Question: is it possible for me to "log in" to the embedded Linux O/S on the cam and view how the SMTP call is being formed (and to look at other things like FTP setup, etc.)?

Note, I am able to use advanced features of the cam successfully (e.g., recording onto my FreeNAS server, configuring FTP - both of which are on the same inside /24 segment as the cams). Overall, I am very pleased with the cameras' performance and features. SMTP is the one issue that I seem unable to resolve.
Melvin
Site Admin
Posts: 2210
Joined: Wed Oct 14, 2015 2:20 pm

Re: SMTP problems with a twist (firewall in play)

Post by Melvin »

Hello Darryl,

Sorry to hear that you are still having issues with the SMTP. It might not take an ip address in SMTP server field as the firmware is looking for a domain name on that field. Unfortunately I am not aware of any method of logging into the OS of the camera to check the logs. If you could give us a call, we can try and figure out the issue together.

https://amcrest.com/contacts
Can't find your answer on the forum? Try our Knowledge Base! https://amcrest.zendesk.com/hc/en-us

Image
Darryl
Posts: 18
Joined: Tue Jun 21, 2016 11:44 am

Re: SMTP problems with a twist (firewall in play)

Post by Darryl »

PROBLEM RESOLVED !!

Short Answer: By changing from wireless to wired operation and plugging camera into my router, camera's SMTP function began working! I then unplugged the cable and reconfigured the camera back to wireless. SMTP still continued to work! If experiencing initial problems with SMTP, just plug your camera into router or network switch, configure once to wired connection and then back to wireless and unplug. Your email connectivity issue will go away.

Longer Answer: A phone chat with Melvin quickly resolved the issue experienced with SMTP failing. It boiled down to this. Multiple ISPs (Google, Yahoo!, GoDaddy, my own SMTP server) were tried with a combination of ports and authentication parameters (e.g., ports 25/465/587 and auth none/SSL/TLS). None would work, yet I was able to send email out from other devices on this network segment (like a NAS server, which the cam writes to!). The camera was setup wirelessly and had been assigned a static IP address. We also tried switching to DHCP, but as expected, that didn't resolve the issue.

What finally did resolve the issue was plugging an Ethernet cable into the camera and temporarily configuring cam to be wired. Even though the camera's default IP address (192.168.0.1) was not recognized by my router (wrong network number), just being attached momentarily to the router made all the difference. After configuring the device with an IP address suitable for my router's network segment, the camera began working as before (expected). But what surprisingly changed was that, now, SMTP was also working! I then configured the GoDaddy ISP account (my preferred SMTP server) and that worked perfectly (as did the prior test using gmail).

Once that was accomplished, I removed the Ethernet cable and reconfigured the device to be wireless. Rejoined the network (all the same settings as before) and, presto, email continued to work! I don't know why this was necessary - every other function of the camera worked flawlessly - but until we went "wired" momentarily, SMTP would not budge!

Many thanks to Melvin! :D :lol:
Melvin
Site Admin
Posts: 2210
Joined: Wed Oct 14, 2015 2:20 pm

Re: SMTP problems with a twist (firewall in play)

Post by Melvin »

Hello Darryl,

Its great to know that finally you got it working. Thank you for posting back here. BTW, I am not the same Melvin in Phone Support!!
Can't find your answer on the forum? Try our Knowledge Base! https://amcrest.zendesk.com/hc/en-us

Image
tonester
Posts: 59
Joined: Wed Jun 29, 2016 10:33 am

Re: SMTP problems with a twist (firewall in play)

Post by tonester »

Hmmm, strictly speculation on my part but I think the source of the issue may be the fact that the default network settings that are loaded when choosing to have the camera function over Wireless is different from those that are shown when you select Wired. I noticed this when I was setting up one of my cameras for the first time--I needed it to be on Wifi for regular use and saw the default loaded Wireless settings were nowhere near what would be the correct settings for my camera to completely function correctly on my private network. I'm guessing you initially set your camera over Wifi rather than first connecting it via Ethernet as you eventually did in getting your SMTP issue finally resolved.
Darryl
Posts: 18
Joined: Tue Jun 21, 2016 11:44 am

Re: SMTP problems with a twist (firewall in play)

Post by Darryl »

Didn't realize that there were two (or more) Melvin's ... both appear very solid! :D

@Tonester - you are right about the sequence of events when I configured my camera. However, I did verify the settings were correct for both the Wired and Wireless cases. It remains a mystery to me. I'm just happy it appears to be over now. Note I have several more cameras to configure. I'm going to experiment with using Wired v. Wireless setup and see what I come up with. I also plan to try "import settings" to save a lot of keystrokes across multiple configuration screens! :lol:
zajacjoe
Posts: 1
Joined: Sat Jan 14, 2017 7:11 am

Re: SMTP problems with a twist (firewall in play)

Post by zajacjoe »

It is easier than connecting a wire.

Just set the wireless connection as the default under

Network -> TCP/IP -> Ethernet Card

Then the email test worked for me!

It had been set a wired even though I've never connected a wire.
Post Reply