-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathkmdacfirewall
More file actions
executable file
·44 lines (37 loc) · 1.27 KB
/
kmdacfirewall
File metadata and controls
executable file
·44 lines (37 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
scriptpath="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
source $scriptpath/main
sudo apt-get install ufw
sudo ufw disable
sudo ufw default deny incoming
sudo ufw allow 22 comment 'SSH'
sudo ufw allow 7770 comment 'KMD'
if (( thirdpartycoins < 1 )); then
#sudo ufw allow 8333 comment 'BTC'
port=13348
sudo ufw allow ${port} comment 'Iguana Notary Main'
for coins in "${coinlist[@]}"; do
coin=($coins)
if [[ ! ${ignoreacs[*]} =~ ${coin[0]} ]]; then
acport=$($komodocli -ac_name=${coin[0]} getinfo | jq .p2pport)
echo $acport
sudo ufw allow ${acport}/tcp comment "${coin[0]}"
fi
done
else
port=13345
sudo ufw allow ${port}/tcp comment 'Iguana Notary Third Party'
sudo ufw allow 26001/tcp comment 'AYA'
sudo ufw allow 57777/tcp comment 'CHIPS'
sudo ufw allow 41878/tcp comment 'EMC2'
sudo ufw allow 33824/tcp comment 'MCL'
sudo ufw allow 27485/tcp comment 'VRSC'
sudo ufw allow 29404/tcp comment 'TOKEL'
sudo ufw allow 38890/tcp comment 'MM2 P2P'
sudo ufw allow 38900/tcp comment 'MM2 WSS'
sudo ufw allow 41888/tcp comment 'MIL'
sudo ufw allow 47777/tcp comment 'SFUSD'
fi
sudo ufw enable
# check the status again
sudo ufw status