ZoneMinder / zmeventnotification

Machine Learning powered Secure Websocket & MQTT based ZoneMinder event notification server
412 stars 128 forks source link

Notification Image showing on WAN, does not resolve on LAN and thus doesn't show image #288

Closed N1GHTPATROL closed 4 years ago

N1GHTPATROL commented 4 years ago

Event Server version

5.15

Hooks version

Unsure, I get this when I run the command: image

The version of ZoneMinder you are using:

1.34

What is the nature of your issue

Bug/Networking Issue

Details

I run ZoneMinder on a laptop on my home network. I've properly forwarded the ports I need. My problem involves the picture being sent from the laptop to the phone where a notification is received. I get the event notification image on 4G LTE / Outside the network, but when connected to the network itself, the image fails and shows a blank area because the domain is pointing to itself. What I mean is, I use the domain my service provider hosts - like c-123-456-789-012.tx.comcast.net which would point to 123.456.789.012 . The domain is inaccessible and will not resolve from inside the network.

I've researched ways to get around this, but I'm unable to set up split DNS and/or unsure of an easy way to do that. The LetsEncrypt certificate I'm using for WSS may complicate this more. There doesn't seem to be any questions like this on the internet. Any ideas as to how to fix this problem so I can see the image on my phone notifications while being on the home network? Thanks for your time - Jason

pliablepixels commented 4 years ago

One option I can think of is set up a dnsmasq internally that points c-123-456-789-012.tx.comcast.net to the LAN IP?

N1GHTPATROL commented 4 years ago

Would I have to manually change the DNS for all of the devices on the network or is there a way to have the devices automatically use the DNS? I'm not too sure how that works but I think this will fully illustrate my problem artwork

pliablepixels commented 4 years ago

DNS masq is a DNS server that can run inside the LAN. When devices try and resolve hostnames, it will provide the IP mapping. You are going to have to google around for dnsmasq tutorials or ask in the ZM forums for more help.