Skip to content

Commit f406409

Browse files
committed
Science Commit 5.
1 parent b95054b commit f406409

2 files changed

Lines changed: 38 additions & 1 deletion

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
38895
1+
39495

scripts/nwe-ports.sh

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,40 @@ NWE_PORTS=(
8888
49214 # Stanford Library
8989
)
9090

91+
# Port → service name mapping for display
92+
declare -A NWE_PORT_NAMES=(
93+
[2000]="StrernaryDirectory"
94+
[5000]="Futures (DemocraticAI)"
95+
[5512]="AES Encryption"
96+
[6682]="Bitcoin"
97+
[7743]="RSA Encryption"
98+
[7744]="DSA Encryption"
99+
[8080]="Tomcat"
100+
[8888]="Reserved"
101+
[9999]="Gray Port Registry"
102+
[10085]="Gray85 Crème"
103+
[20000]="Strernary AI"
104+
[49111]="Reserved"
105+
[49133]="WeatherServer"
106+
[49144]="BinaryHttp"
107+
[49152]="NitroWebExpress"
108+
[49155]="ConnectionStatus"
109+
[49166]="ModuleInstallation"
110+
[49177]="AsciiCreator"
111+
[49188]="ModuleLoaderDaemon"
112+
[49199]="Communicator"
113+
[49200]="CalendarD44"
114+
[49201]="JapanSignal"
115+
[49202]="RussiaSignal"
116+
[49203]="MexicoSignal"
117+
[49204]="GreeceInternational"
118+
[49210]="California FBI"
119+
[49211]="California CIA"
120+
[49212]="California NSA"
121+
[49213]="Duke University"
122+
[49214]="Stanford Library"
123+
)
124+
91125
# ═══════════════════════════════════════════════════════════════════════════════
92126
# nwe_open_ports — Open all NWE ports in the system firewall
93127
# Called by: start-all.sh, start-backends.sh, post-clone.sh
@@ -108,16 +142,19 @@ nwe_open_ports() {
108142

109143
if command -v ufw &>/dev/null; then
110144
for PORT in "${NWE_PORTS[@]}"; do
145+
local SVCNAME="${NWE_PORT_NAMES[$PORT]:-unknown}"
111146
if ufw status | grep -q "$PORT/tcp.*ALLOW" 2>/dev/null; then
112147
SKIPPED=$((SKIPPED + 1))
113148
elif [ -n "${NWE_TRUSTED_IP:-}" ]; then
114149
if sudo ufw allow from "$NWE_TRUSTED_IP" to any port "$PORT" proto tcp comment "NWE: $PORT" 2>/dev/null; then
150+
printf " %-5s %-25s ✓ (restricted to %s)\n" "$PORT" "$SVCNAME" "$NWE_TRUSTED_IP"
115151
OPENED=$((OPENED + 1))
116152
else
117153
FAILED=$((FAILED + 1))
118154
fi
119155
else
120156
if sudo ufw allow "$PORT/tcp" comment "NWE: $PORT" 2>/dev/null; then
157+
printf " %-5s %-25s ✓\n" "$PORT" "$SVCNAME"
121158
OPENED=$((OPENED + 1))
122159
else
123160
FAILED=$((FAILED + 1))

0 commit comments

Comments
 (0)