zm and zmninja don't stream over ssl

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
leksand
Posts: 48
Joined: Thu May 26, 2022 12:03 pm

zm and zmninja don't stream over ssl

Post by leksand »

It may have happened after the updates, now the latest version.

Today I found out that the image in zmninja has stopped being displayed. The portal is detected, authorization passes, but I do not see the image from the cameras. I used to go to http://ip/zm .

After studying the forum, I made a dns name, https + lets'encrypt certificate. Now everything is the same, for verification I go through the web version by domain name - everything is OK with the certificate, but there is no video.

Configured via NAT (requests to ports 80 and 443 external ip > internal ip). The certificate is ok, I can log in both from the application and from the web by name, but there is no video. The assistant in the android app shows that everything is fine, detects portals and comes in, but there is no video.

At the same time, in the local network, when logging in via the internal ip, everything works as before.

Please help me figure out how to return the work of the external portal and zmninja.
leksand
Posts: 48
Joined: Thu May 26, 2022 12:03 pm

Re: zm and zmninja don't stream over ssl

Post by leksand »

There are errors in the logs

Image

Socket /run/zm/zms-368445s.sock does not exist. This file is created by zms, and since it does not exist, either zms did not run, or zms exited early. Please check your zms logs and ensure that CGI is enabled in apache and check that the PATH_ZMS is set correctly. Make sure that ZM is actually recording. If you are trying to view a live stream and the capture process (zmc) is not running then zms will exit. Please go to http://zoneminder.readthedocs.io/en/lat ... window-etc for more information.

Browsers are not IE. Tried chrome and firefox. The link from the log failed to solve the problem.

Perhaps these errors are from a new camera that worked in the h265 codec, after switching to h264, the errors disappeared, I made a separate topic on codecs.
viewtopic.php?t=32379
leksand
Posts: 48
Joined: Thu May 26, 2022 12:03 pm

Re: zm and zmninja don't stream over ssl

Post by leksand »

It seems to me that the security problem is access via NAT, everything used to work - an internal address from the subnet 10.0.0.0 with NAT translationation.

Previously, everything worked over ip and http. After some update, the video stopped showing, while I can log in to the application using my username and password, too.

Now https + domain name + let'sencrypt, but also via NAT. The video does not show. At the same time, the certificate is valid - everything works through NAT
leksand
Posts: 48
Joined: Thu May 26, 2022 12:03 pm

Re: zm and zmninja don't stream over ssl

Post by leksand »

I can solve the problem based on the documentation.

What did you do:
I studied the documentation for zmninja again and found in my links instructions for enabling multisport
https://medium.com/zmninja/multi-port-s ... 836a336c93

0) certificates from lets'encrypt, ssl and https were configured earlier (used certbot, Debian OS);

1) opened the ports that the multiport did for the /etc/apache2/ports.conf file - moved it from the root section to the <IfModule ssl_module> section (generally, apache2 listened to them - but decided to move them to the correct section);

2) configured port forwarding configured above (I have 30000-30030) to local ip - there were only 80 and 443;

3) in the settings of the zmninja application on the phone, in the developer settings, enabled the option “Append basic auth tokens in images” and saved it.

Now it works in the local network, via the Internet and from the phone.
Post Reply