Changed Tomcat to operate on port 8080 and PHPMyAdmin to port 9000

Cloudflare by default only permits specific ports to pass through in the security mode we use. Since PHPMyAdmin should be hard to access, by binding it to port 9000, Cloudflare does not allow traffic unless you bypass it.
This commit is contained in:
Marwolf
2018-08-04 10:09:59 -04:00
parent e5c7f34d26
commit 4d84f9d211
8 changed files with 28 additions and 16 deletions

View File

@@ -99,7 +99,7 @@ if [ "$install" == "1" ]; then
echo ""
echo "Configuring UFW to allow good ports and block MySQL from outside"
echo ""
sudo ufw allow 22/tcp && ufw allow 80/tcp && ufw allow 8082/tcp && ufw allow 443/tcp && ufw allow 80/tcp && ufw allow 53595/tcp && ufw deny 3306/tcp
sudo ufw allow 22/tcp && ufw allow 80/tcp && ufw allow 8080/tcp && ufw allow 443/tcp && ufw allow 9000/tcp && ufw allow 53595/tcp && ufw deny 3306/tcp
sudo sed -i 's/DEFAULT_FORWARD_POLICY="DENY"/DEFAULT_FORWARD_POLICY="ACCEPT"/g' /etc/default/ufw
sudo ufw reload
echo ""
@@ -138,7 +138,8 @@ if [ "$install" == "1" ]; then
echo "Permitting good ports through the firewall."
echo ""
firewall-cmd --permanent --add-port=53595/tcp
firewall-cmd --permanent --add-port=8082/tcp
firewall-cmd --permanent --add-port=8080/tcp
firewall-cmd --permanent --add-port=9000/tcp
firewall-cmd --permanent --add-port=80/tcp
firewall-cmd --permanent --add-port=443/tcp
firewall-cmd --permanent --add-port=22/tcp
@@ -222,8 +223,8 @@ if [ "$install" == "1" ]; then
echo ""
echo "Permitting ports through the firewall."
firewall-cmd --permanent --add-port=53595/tcp
firewall-cmd --permanent --add-port=8082/tcp
firewall-cmd --permanent --add-port=80/tcp
firewall-cmd --permanent --add-port=8080/tcp
firewall-cmd --permanent --add-port=9000/tcp
firewall-cmd --permanent --add-port=443/tcp
firewall-cmd --permanent --add-port=22/tcp
firewall-cmd --reload