Closed poflynn closed 6 years ago
I recently set up ZoneMinder on my Fedora Server and yes, to access the web interface you need to allow httpd through your firewall. You don't necessarily have to disable it completely, just allow the port httpd is running through using firewallctl. On my system, the commands are as follows:
sudo firewallctl zone FedoraServer add port 80/tcp
sudo firewallctl zone FedoraServer add port 443/tcp
This is specific to Fedora, and in particular I am using the default firewall zone "FedoraServer" and customizing it. This name changes on a per-system basis.
Going on what cybersteel8 has said, the best way to do this for Centos 7 would be to open the ports, not disable the firewall.
sudo firewall-cmd --zone=public --add-port=80/tcp --permanent
sudo firewall-cmd --zone=public --add-port=443/tcp --permanent
sudo firewall-cmd --reload
I suggest we remove the --zone
option and let it choose the default. If they are doing anything funky, then they should know to check their active zone / --list-all-zones
and work out what's going on.
Also, --add-service=http
instead of specific port - functionally the same ofc. but seems sad to not use it (and easier to read) 😄
To prevent ONVIF discovery from failing, you're going to want to firewall-cmd --permanent --zone=public --add-port=3702/udp
(Editing for formatting only) By default CentOS has firewalld turned on and blocking ports 80 & 443. I disabled it to get ZM to work. I was going to submit a PR to the RedHat README adding this to the instructions and am still happy to if you like but I thought ppl might not like the idea of the firewall being disabled. If this is ok LMK and I will submit the PR. I fixed it using the 2 cmds below, for anyone hitting this issue.
sudo systemctl stop firewalld
sudo systemctl disable firewalld