Skip to content

Commit 319ac85

Browse files
committed
Science Commit 5.
1 parent 801e0ec commit 319ac85

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

scripts/web/post-clone.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,26 @@ echo "[OK] Tomcat: $TOMCAT_HOME"
4848
find "$PROJECT_ROOT" -name "*.sh" -exec chmod +x {} \;
4949
echo "[OK] Scripts: chmod +x applied"
5050

51+
# 5.1. Open all NWE ports (UFW firewall)
52+
echo ""
53+
echo "[*] Configuring firewall — opening all NWE service ports..."
54+
if command -v ufw &>/dev/null; then
55+
bash "$PROJECT_ROOT/scripts/ufw-allow-all.sh"
56+
echo "[OK] UFW: ports opened and firewall enabled"
57+
elif command -v firewall-cmd &>/dev/null; then
58+
# RHEL/CentOS/Fedora — firewalld fallback
59+
for PORT in 2000 5000 5512 6682 7743 7744 8080 8888 9999 10085 20000 \
60+
49111 49133 49144 49152 49155 49166 49177 49188 49199 49200 \
61+
49201 49202 49203 49204 49210 49211 49212 49213 49214; do
62+
firewall-cmd --permanent --add-port="$PORT/tcp" >/dev/null 2>&1
63+
done
64+
firewall-cmd --reload >/dev/null 2>&1
65+
echo "[OK] firewalld: ports opened"
66+
else
67+
echo "[WARN] No ufw or firewalld found — manually open ports:"
68+
echo " 9999, 10085, 49152, 49210-49214, 20000, 8080, etc."
69+
fi
70+
5171
# 5.5. Setup module databases
5272
echo ""
5373
echo "[*] Setting up module databases..."

0 commit comments

Comments
 (0)