{"id":62,"date":"2020-01-27T01:03:21","date_gmt":"2020-01-27T01:03:21","guid":{"rendered":"https:\/\/scatterpated.net\/?p=62"},"modified":"2020-01-27T02:07:08","modified_gmt":"2020-01-27T02:07:08","slug":"enable-zoneminder-multi-port-mode-on-centos-7","status":"publish","type":"post","link":"https:\/\/scatterpated.net\/?p=62","title":{"rendered":"Enable ZoneMinder Multi-port Mode on Centos 7"},"content":{"rendered":"\n<p>Multi-port is a work-around for the six simultaneous connections per domain linmit in Chrome and WebKit. When implemented, ZoneMinder outputs each monitor&#8217;s video stream on a separate port, which Chrome considers a separate domain.<\/p>\n\n\n\n<p>The instructions and forum posts I found on the web were all for Debian-based distros. I run ZoneMinder on CentOS 7. When RPMFusion recently updated ZoneMinder to 1.34.0 (stable), I took the opportunity to enable multi-port mode. This is actually easier on CentOS and other RedHat-based distros than it is on Debian or Ubuntu. So here&#8217;s how. Begin by pointing your browser to: <\/p>\n\n\n\n<p><code>https:\/\/your.server.hostname\/zm\/index.php?view=options&amp;tab=network<\/code><\/p>\n\n\n\n<p>Enter &#8220;30000&#8221; (without quotes) in the MIN_STREAMING_PORT field, then click the SAVE button. This tells ZoneMinder to stream video each monitor on a port number equaling 30000 + the monitor number. So if your system has eight monitors, ZoneMinder serves the first monitor stream on port 30001, the second on 30002, etc.&nbsp;up to port 30008.<\/p>\n\n\n\n<p>We&#8217;re not done. Apache must be configured to listen on the assigned ports. Since the upgrade to ZoneMinder 1.34.0 forces client connections via ssl we&#8217;ll be editing ssl.conf. Unlike Debian, this is the only file we need to edit for the default RPMFusion installation of ZoneMinder on CentOS 7. Prior to editing, make a back-up copy:<\/p>\n\n\n\n<p><code>sudo cp \/etc\/httpd\/conf.d\/ssl.conf \/etc\/httpd\/conf.d\/ssl.conf.bak<\/code><\/p>\n\n\n\n<p>Next , lets edit the ssl.conf file. I detest VI&#8217;s user interface, so I use Nano:&nbsp;<\/p>\n\n\n\n<p><code>sudo nano -w \/etc\/httpd\/conf.d\/ssl.conf<\/code><\/p>\n\n\n\n<p>Scroll down to the line that reads &#8220;Listen 443 https&#8221;, then add a line corresponding to each new port ZoneMinder needs to stream video, one per monitor starting with 30001. Assuming a system with eight monitors, the new lines are:<\/p>\n\n\n\n<p><code>Listen 30001 https<br>Listen 30002 https<br>Listen 30003 https<br>Listen 30004 https<br>Listen 30005 https<br>Listen 30006 https<br>Listen 30007 https<br>Listen 30008 https<\/code><\/p>\n\n\n\n<p>Next, find the line which reads &#8220;&lt;VirtualHost _default_:443&gt;&#8221; and edit to include the new streaming ports for ZoneMinder, separated by spaces. For the above example with three monitors, the new line would look like this:<\/p>\n\n\n\n<p><code>&lt;VirtualHost _default_:443 *:3001 *:30002 *:30003 *:30004 *:30005 *:30006 *:30007 *:30008&gt;<\/code><\/p>\n\n\n\n<p>Write out the file, then exit Nano. Next, test the Apache configuration:<\/p>\n\n\n\n<p><code>sudo apachectl -t<\/code><\/p>\n\n\n\n<p>Correct any errors, then re-test. Once all is well, restart Apache:<\/p>\n\n\n\n<p><code>sudo systemctl restart httpd<\/code><\/p>\n\n\n\n<p>Then restart ZoneMinder:<\/p>\n\n\n\n<p><code>sudo systemctl restart zoneminder<\/code><\/p>\n\n\n\n<p>Lastly, we must open the range of new ports in the firewall:<\/p>\n\n\n\n<p><code>sudo firewall-cmd --zone=public add-port=30001-30008\/tcp<\/code><\/p>\n\n\n\n<p>Your server should answer &lt;success&gt;. <\/p>\n\n\n\n<p><code>sudo firewall-cmd --zone=public add-port=30001-30008\/tcp --permanent<\/code><\/p>\n\n\n\n<p>Your server should answer &lt;success&gt;. <\/p>\n\n\n\n<p><code>sudo firewall-cmd --reload<\/code><\/p>\n\n\n\n<p>Your server should answer &lt;success&gt;.  Now point your browser to:<\/p>\n\n\n\n<p><code>https:\/\/your.server.hostname\/zm\/index.php?view=montage<\/code><\/p>\n\n\n\n<p>You should see all of your monitors streaming on the Montage page. Congrats! Go get yourself a beer. <\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Multi-port is a work-around for the six simultaneous connections per domain linmit in Chrome and WebKit. When implemented, ZoneMinder outputs each monitor&#8217;s video stream on a separate port, which Chrome considers a separate domain. The instructions and forum posts I found on the web were all for Debian-based distros. I run ZoneMinder on CentOS 7. [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[11,13,12],"class_list":["post-62","post","type-post","status-publish","format-standard","hentry","category-infotech","tag-centos-7","tag-multi-port","tag-zoneminder"],"_links":{"self":[{"href":"https:\/\/scatterpated.net\/index.php?rest_route=\/wp\/v2\/posts\/62","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/scatterpated.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/scatterpated.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/scatterpated.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/scatterpated.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=62"}],"version-history":[{"count":5,"href":"https:\/\/scatterpated.net\/index.php?rest_route=\/wp\/v2\/posts\/62\/revisions"}],"predecessor-version":[{"id":73,"href":"https:\/\/scatterpated.net\/index.php?rest_route=\/wp\/v2\/posts\/62\/revisions\/73"}],"wp:attachment":[{"href":"https:\/\/scatterpated.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=62"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/scatterpated.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=62"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/scatterpated.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=62"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}