Skip to content

Commit

Permalink
Fix for Monero DDOS attack
Browse files Browse the repository at this point in the history
  • Loading branch information
seibelj committed Dec 2, 2020
1 parent f14e3a8 commit d8508e2
Show file tree
Hide file tree
Showing 2 changed files with 139 additions and 1 deletion.
127 changes: 127 additions & 0 deletions icryptonode/node_commands/block.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
137.74.139.48
137.74.189.88
142.44.144.199
142.44.144.243
144.217.199.37
144.217.199.38
144.217.224.26
144.217.233.252
144.217.241.118
144.217.241.28
144.217.248.48
144.217.32.135
144.217.32.165
145.239.118.5
146.59.156.116
146.59.156.117
147.135.178.157
147.135.190.201
151.80.17.140
165.22.228.133
178.32.215.155
178.33.101.193
178.62.116.193
188.165.17.204
192.99.154.164
193.70.78.196
217.182.9.71
51.178.251.7
51.210.96.211
51.255.126.219
51.255.233.156
51.68.200.138
51.68.200.139
51.68.209.38
51.68.209.39
51.68.214.143
51.68.215.64
51.68.220.13
51.68.222.162
51.68.252.164
51.75.102.208
51.75.157.195
51.75.157.196
51.75.159.19
51.75.162.171
51.75.70.225
51.77.136.40
51.77.192.92
51.77.202.219
51.77.227.128
51.79.11.198
51.79.11.199
51.79.117.94
51.79.117.95
51.79.117.96
51.79.117.97
51.79.117.98
51.79.117.99
51.79.49.41
51.79.50.44
51.79.51.27
51.79.51.28
51.79.52.228
51.79.54.168
51.79.54.188
51.79.58.89
51.79.58.90
51.79.58.91
51.79.58.92
51.79.58.93
51.79.58.94
51.83.124.102
51.83.124.103
51.83.81.237
51.89.133.122
51.89.134.164
51.89.134.178
51.89.144.152
51.89.144.153
51.89.164.226
51.89.181.105
51.89.181.106
51.89.181.107
51.89.181.65
51.89.181.66
51.89.181.95
51.89.181.96
51.89.181.97
51.89.208.175
51.91.108.121
51.91.108.125
51.91.33.151
51.91.33.156
51.91.8.178
5.196.124.241
54.36.150.238
54.37.172.36
54.37.179.243
54.37.179.244
54.38.217.119
54.39.75.52
54.39.75.53
54.39.75.54
54.39.75.55
54.39.75.56
54.39.75.57
54.39.75.65
54.39.75.66
54.39.75.67
54.39.75.68
54.39.75.69
54.39.75.70
54.39.75.71
54.39.75.72
54.39.75.73
66.70.207.166
66.70.255.248
79.137.53.34
79.137.53.36
79.137.8.254
87.98.224.123
87.98.229.114
91.134.179.116
92.222.248.82
94.23.147.238
94.23.163.184
94.23.169.209
13 changes: 12 additions & 1 deletion icryptonode/node_commands/monero
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#!/bin/sh

DAEMON_FILE=/etc/icryptonode/daemon/monero/monerod

BANLIST_FILE_DEST=/etc/icryptonode/daemon/monero/block.txt
BANLIST_FILE_SRC=/var/www/html/icryptonode/node_commands/block.txt
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

BLOCKCHAIN_DIR=/etc/icryptonode/blockchain

LOG_FILE=/etc/icryptonode/blockchain/bitmonero.log
Expand Down Expand Up @@ -28,8 +33,14 @@ monero_start () {
echo "DAEMON_ENABLED = no, not starting monero"
exit 1
fi
if [ ! -f "$BANLIST_FILE_DEST" ]; then
echo "Setting banlist"
cp $BANLIST_FILE_SRC $BANLIST_FILE_DEST
chown www-data:www-data $BANLIST_FILE_DEST
chmod 755 $BANLIST_FILE_DEST
fi
echo "Starting monero"
$DAEMON_FILE --detach --db-salvage --log-file $LOG_FILE --data-dir $BLOCKCHAIN_DIR --rpc-bind-ip 0.0.0.0 --rpc-login $DAEMON_USER:$DAEMON_PASS --rpc-bind-port $DAEMON_RPC_PORT --confirm-external-bind
$DAEMON_FILE --detach --db-salvage --ban-list $BANLIST_FILE_DEST --log-file $LOG_FILE --data-dir $BLOCKCHAIN_DIR --rpc-bind-ip 0.0.0.0 --rpc-login $DAEMON_USER:$DAEMON_PASS --rpc-bind-port $DAEMON_RPC_PORT --confirm-external-bind
}

monero_restart () {
Expand Down

0 comments on commit d8508e2

Please sign in to comment.