From 228bdc5e1c9d201f678b32026bf74959bd9e4a24 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Thu, 25 May 2017 11:17:40 -0600 Subject: [PATCH] nix fail2ban --- setup.bash | 69 +++++++++++++++++++++++++++--------------------------- 1 file changed, 35 insertions(+), 34 deletions(-) diff --git a/setup.bash b/setup.bash index 12ae219..23dfe26 100644 --- a/setup.bash +++ b/setup.bash @@ -12,7 +12,8 @@ NODEJS_NAME="node" NODEJS_BASE_URL="https://nodejs.org" BASE_URL="https://git.daplie.com/coolaj86/node-install-script/raw/master" -NO_FAIL2BAN="" +#NO_FAIL2BAN="" +NO_FAIL2BAN="nope" OS="unsupported" ARCH="" NODEJS_VER="" @@ -188,39 +189,39 @@ fi # DEPENDENCIES # ################ -if [ -z "$(which fail2ban-server | grep fail2ban)" ]; then - echo "" - echo "Your server didn't come with fail2ban preinstalled!!!" - echo "Among other things, fail2ban secures ssh so that your server isn't reaped by botnets." - echo "" - echo "Since you're obviously connecting this computer to a network, you should install fail2ban before continuing" - echo "" - echo "Install fail2ban? [Y/n]" - echo "(if unsure, just hit [enter])" - read INSTALL_FAIL2BAN - - if [ "n" == "${INSTALL_FAIL2BAN}" ] || [ "no" == "${INSTALL_FAIL2BAN}" ] || [ "N" == "${INSTALL_FAIL2BAN}" ] || [ "NO" == "${INSTALL_FAIL2BAN}" ]; then - echo "" - echo "I don't think you understand: This is important." - echo "" - echo "Your server will be under constant attack by botnets via ssh." - echo "It only takes a few extra seconds to install and the defaults are adequate for protecting you." - echo "" - echo "Change your mind?" - echo "Ready to install fail2ban? [Y/n]" - read INSTALL_FAIL2BAN - if [ "n" == "${INSTALL_FAIL2BAN}" ] || [ "no" == "${INSTALL_FAIL2BAN}" ] || [ "N" == "${INSTALL_FAIL2BAN}" ] || [ "NO" == "${INSTALL_FAIL2BAN}" ]; then - clear - echo "you make me sad :-(" - sleep 0.5 - echo "but whatever, it's your funeral..." - sleep 1 - NO_FAIL2BAN="nope" - else - echo "Phew, dodged the bullet on that one... Will install fail2ban.. :-)" - fi - fi -fi +#if [ -z "$(which fail2ban-server | grep fail2ban)" ]; then +# echo "" +# echo "Your server didn't come with fail2ban preinstalled!!!" +# echo "Among other things, fail2ban secures ssh so that your server isn't reaped by botnets." +# echo "" +# echo "Since you're obviously connecting this computer to a network, you should install fail2ban before continuing" +# echo "" +# echo "Install fail2ban? [Y/n]" +# echo "(if unsure, just hit [enter])" +# read INSTALL_FAIL2BAN +# +# if [ "n" == "${INSTALL_FAIL2BAN}" ] || [ "no" == "${INSTALL_FAIL2BAN}" ] || [ "N" == "${INSTALL_FAIL2BAN}" ] || [ "NO" == "${INSTALL_FAIL2BAN}" ]; then +# echo "" +# echo "I don't think you understand: This is important." +# echo "" +# echo "Your server will be under constant attack by botnets via ssh." +# echo "It only takes a few extra seconds to install and the defaults are adequate for protecting you." +# echo "" +# echo "Change your mind?" +# echo "Ready to install fail2ban? [Y/n]" +# read INSTALL_FAIL2BAN +# if [ "n" == "${INSTALL_FAIL2BAN}" ] || [ "no" == "${INSTALL_FAIL2BAN}" ] || [ "N" == "${INSTALL_FAIL2BAN}" ] || [ "NO" == "${INSTALL_FAIL2BAN}" ]; then +# clear +# echo "you make me sad :-(" +# sleep 0.5 +# echo "but whatever, it's your funeral..." +# sleep 1 +# NO_FAIL2BAN="nope" +# else +# echo "Phew, dodged the bullet on that one... Will install fail2ban.. :-)" +# fi +# fi +#fi bash "/tmp/${INSTALL_DEPS_FILE}" "${NO_FAIL2BAN}"