service

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
service [2023/07/31 15:15] – created nadirservice [2023/08/03 10:01] (current) – removed nadir
Line 1: Line 1:
-====== Fail2Ban Documentation ====== 
- 
-==== Introduction ==== 
- 
-Fail2Ban is an intrusion prevention software that helps protect your system from brute-force attacks and other malicious activities. It monitors log files and takes action against IP addresses that show suspicious behavior. This documentation provides an overview of Fail2Ban and how to set it up on your system. 
- 
-==== Installation ==== 
- 
-To install Fail2Ban on your system, follow these steps: 
- 
-== Step 1: Update Package List == 
-Before installing Fail2Ban, update the package list to ensure you get the latest version available: 
-<cli> 
-$ sudo apt update 
-</cli> 
- 
-== Step 2: Install Fail2Ban == 
- 
-Install Fail2Ban using your package manager (for Ubuntu/Debian): 
-<cli> 
-$ sudo apt install fail2ban 
-</cli> 
- 
-==== Configuration ==== 
- 
-Fail2Ban's main configuration file is located at /etc/fail2ban/jail.conf. However, it's recommended to create a local configuration file to avoid overwriting changes during package updates: 
- 
-== Step 1: Copy the Configuration File == 
- 
-<cli> 
-$ sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local 
-</cli> 
- 
-== Step 2: Edit the Configuration == 
- 
-Open /etc/fail2ban/jail.local using a text editor and customize the settings according to your needs. Some common configurations include: 
-  * bantime: The duration in seconds for which an IP address is banned. 
-  * maxretry: The number of failed login attempts before banning an IP . 
-  //**Note**// 
-     By default the server allows 3 wrong password retries , to fail2ban it only counts as one 
-  
-  * destemail: The email address where notifications are sent. 
- 
-== Step 3: Restart Fail2Ban == 
- 
-After making changes to the configuration, restart Fail2Ban for the changes to take effect: 
-<cli> 
-$ sudo systemctl restart fail2ban 
-</cli> 
-==== Monitoring and Troubleshooting ==== 
- 
-Fail2Ban provides several commands to monitor and troubleshoot its functionality: 
- 
-  * fail2ban-client status: Check the status of Fail2Ban and the number of bans in effect. 
-  * fail2ban-client status <jail-name>: Check the status of a specific jail. 
-  * fail2ban-client set <jail-name> unbanip <ip-address>: Unban a specific IP address. 
- 
  
  • service.1690812910.txt.gz
  • Last modified: 2023/07/31 15:15
  • by nadir