Skip to content

Commit

Permalink
Update install.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
yuriy0803 authored Dec 10, 2023
1 parent b15ef2a commit 28c1c9b
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 28c1c9b

Please sign in to comment.