Skip to content

Simple 1-click install Fail2ban

License

Notifications You must be signed in to change notification settings

Onair-santa/Fail2ban-1-click

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 

Repository files navigation

(Debian, Ubuntu) Fail2ban-1-click

Fail2ban - the open-source security solution for youre server

Bash script installs Fail2ban and settings file, and installs nftables to block IP addresses

image

💠 Ensure that the sudo and wget packages are installed on your system:

apt install -y sudo wget

💠 Root Access is Required. If the user is not root, first run:

sudo -i

💠 Then:

wget "https://raw.githubusercontent.com/Onair-santa/Fail2ban-1-click/main/fail2ban.sh" -O fail2ban.sh && chmod +x fail2ban.sh && bash fail2ban.sh

It performs the following tasks:

  • Remove firewalld, ufw or iptables
  • Install nftables
  • Open ports 22, 443, 80
  • Install Fail2ban
  • install config jail.local
  • Starting fail2ban

Config Fail2ban:

  • jail enabled: sshd(port 22), recidive(allport)

  • Status command:

    fail2ban-client status
    fail2ban-client status sshd
    fail2ban-client status recidive
    

💠 Thanks

https://github.com/fail2ban/fail2ban