Skip to content

A free open source IT asset/license management system

Setup firewall rules on CentOS 7. (#4329)

tiagom6224211cb674ff
diff --git a/snipeit.sh b/snipeit.sh
index 6900788b53..4b9b7b31d5 100755
--- a/snipeit.sh
+++ b/snipeit.sh
@@ -526,6 +526,12 @@ case $distro in
installsnipeit
+ if [ "$(firewall-cmd --state)" == "running" ]; then
+ echo "* Configuring firewall."
+ log "firewall-cmd --zone=public --add-port=http/tcp --permanent"
+ log "firewall-cmd --reload"
+ fi
+
#Check if SELinux is enforcing
if [ "$(getenforce)" == "Enforcing" ]; then
echo "* Configuring SELinux."