1
0
mirror of https://github.com/tommytran732/Pterodactyl-Script synced 2024-11-22 02:21:33 -05:00

Fixed firewall rules

This commit is contained in:
TommyTran732 2021-09-25 23:53:24 -04:00
parent 784d2f80de
commit 26a9ba096f
No known key found for this signature in database
GPG Key ID: 8825C3851DC29C20

View File

@ -979,30 +979,16 @@ EOF
ufw allow 3306
elif [ "$installoption" = "2" ]; then
ufw allow 80
ufw allow 443
ufw allow 3306
ufw allow 8080
ufw allow 2022
elif [ "$installoption" = "3" ]; then
ufw allow 80
ufw allow 8080
ufw allow 2022
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
ufw allow 2022
ufw allow 3306
fi
yes |ufw enable
yes | ufw enable
elif [ "$lsb_dist" = "centos" ] || [ "$lsb_dist" = "fedora" ] || [ "$lsb_dist" = "rhel" ]; then
yum -y install firewalld
systemctl enable firewalld
@ -1012,29 +998,16 @@ EOF
firewall-cmd --add-service=https --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
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
firewall-cmd --permanent --add-service=80/tcp
firewall-cmd --permanent --add-port=2022/tcp
firewall-cmd --permanent --add-port=8080/tcp
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
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
}