|
@@ -57,6 +57,18 @@ SSH_HOST_KEY_ALGORITHMS=$(cat $MAIN_PROJECT_FILE | grep 'SSH_HOST_KEY_ALGORITHMS
|
57
|
57
|
# refresh gpg keys every few hours
|
58
|
58
|
REFRESH_GPG_KEYS_HOURS=2
|
59
|
59
|
|
|
60
|
+function global_rate_limit {
|
|
61
|
+ sudo cp /etc/sysctl.conf ~/sysctl.conf
|
|
62
|
+ if ! grep -q "tcp_challenge_ack_limit" ~/sysctl.conf; then
|
|
63
|
+ echo 'net.ipv4.tcp_challenge_ack_limit = 999999999' >> ~/sysctl.conf
|
|
64
|
+ else
|
|
65
|
+ sed -i 's|net.ipv4.tcp_challenge_ack_limit.*|net.ipv4.tcp_challenge_ack_limit = 999999999|g' ~/sysctl.conf
|
|
66
|
+ fi
|
|
67
|
+ sudo cp ~/sysctl.conf /etc/sysctl.conf
|
|
68
|
+ sudo rm ~/sysctl.conf
|
|
69
|
+ sudo sysctl -p
|
|
70
|
+}
|
|
71
|
+
|
60
|
72
|
function refresh_gpg_keys {
|
61
|
73
|
if [ ! -f /usr/bin/gpg ]; then
|
62
|
74
|
sudo apt-get -y install gnupg
|
|
@@ -188,6 +200,7 @@ done
|
188
|
200
|
echo $'Configuring client'
|
189
|
201
|
refresh_gpg_keys
|
190
|
202
|
configure_ssh_client
|
|
203
|
+global_rate_limit
|
191
|
204
|
configure_monkeysphere
|
192
|
205
|
if [[ $MESH_CLIENT_INSTALL == $'yes' || $MESH_CLIENT_INSTALL == $'y' || $MESH_CLIENT_INSTALL == $'on' ]]; then
|
193
|
206
|
echo $'Installing mesh packages'
|