Browse Source

Update install.sh

master
yuriy0803 2 years ago committed by GitHub
parent
commit
28c1c9b185
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      install.sh

11
install.sh

@ -7,8 +7,15 @@ echo "Welcome to the installation!"
# Update and upgrade the package list
sudo apt-get update && sudo apt-get upgrade -y
# Install npm, rsync, git, redis-server, and nginx
sudo apt-get install npm rsync git ipset redis-server nginx -y
# Install npm, rsync, git, redis-server, nginx, and fail2ban
sudo apt-get install npm rsync git ipset redis-server nginx fail2ban -y
# Configure Fail2Ban for SSH
sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
sudo sed -i '/^\[sshd\]$/a enabled = true\nmaxretry = 3\nfindtime = 600\nbantime = 3600' /etc/fail2ban/jail.local
# Restart Fail2Ban to apply changes
sudo systemctl restart fail2ban
sudo ipset create blacklist hash:ip

Loading…
Cancel
Save