From de2a087a957f8ed39b11fda9ada0332d73766df4 Mon Sep 17 00:00:00 2001 From: HeyJack Date: Thu, 15 Oct 2020 15:41:34 +0100 Subject: [PATCH] Fix Firewall Ports --- install.sh | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 283e4ff..f1c85e5 100644 --- a/install.sh +++ b/install.sh @@ -1838,10 +1838,24 @@ EOF ufw allow 443 ufw allow 3306 elif [ "$installoption" = "2" ]; then + ufw allow 80 + ufw allow 443 + ufw allow 3306 + elif [ "$installoption" = "3" ]; then ufw allow 80 ufw allow 8080 ufw allow 2022 - elif [ "$installoption" = "3" ]; then + elif [ "$installoption" = "4" ]; then + ufw allow 80 + ufw allow 8080 + ufw allow 2022 + elif [ "$installoption" = "5" ]; then + ufw allow 80 + ufw allow 443 + ufw allow 8080 + ufw allow 2022 + ufw allow 3306 + elif [ "$installoption" = "6" ]; then ufw allow 80 ufw allow 443 ufw allow 8080 @@ -1856,17 +1870,31 @@ EOF if [ "$installoption" = "1" ]; then firewall-cmd --add-service=http --permanent firewall-cmd --add-service=https --permanent - firewall-cmd --add-service=mysql --permanent + firewall-cmd --add-service=mysql --permanent elif [ "$installoption" = "2" ]; then + firewall-cmd --add-service=http --permanent + firewall-cmd --add-service=https --permanent + firewall-cmd --add-service=mysql --permanent + elif [ "$installoption" = "3" ]; then firewall-cmd --permanent --add-service=80/tcp firewall-cmd --permanent --add-port=2022/tcp firewall-cmd --permanent --add-port=8080/tcp - elif [ "$installoption" = "3" ]; then + elif [ "$installoption" = "4" ]; then + firewall-cmd --permanent --add-service=80/tcp + firewall-cmd --permanent --add-port=2022/tcp + firewall-cmd --permanent --add-port=8080/tcp + elif [ "$installoption" = "5" ]; then firewall-cmd --add-service=http --permanent firewall-cmd --add-service=https --permanent firewall-cmd --permanent --add-port=2022/tcp firewall-cmd --permanent --add-port=8080/tcp - firewall-cmd --permanent --add-service=mysql + firewall-cmd --permanent --add-service=mysql + elif [ "$installoption" = "6" ]; then + firewall-cmd --add-service=http --permanent + firewall-cmd --add-service=https --permanent + firewall-cmd --permanent --add-port=2022/tcp + firewall-cmd --permanent --add-port=8080/tcp + firewall-cmd --permanent --add-service=mysql fi fi }