mirror of
				https://github.com/mail-in-a-box/mailinabox.git
				synced 2025-11-03 19:30:54 +00:00 
			
		
		
		
	added some DDoS protection referenced from https://easyengine.io/tutorials/nginx/fail2ban/ adding a new Fail2Ban filter dubbed nginx-req-limit
This commit is contained in:
		
							parent
							
								
									b5af68a3a0
								
							
						
					
					
						commit
						1fb3434ff5
					
				
							
								
								
									
										13
									
								
								conf/fail2ban/filter.d/nginx-req-limit.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								conf/fail2ban/filter.d/nginx-req-limit.conf
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,13 @@
 | 
			
		||||
# Fail2Ban configuration file
 | 
			
		||||
#
 | 
			
		||||
# supports: ngx_http_limit_req_module module
 | 
			
		||||
 | 
			
		||||
[Definition]
 | 
			
		||||
 | 
			
		||||
failregex = limiting requests, excess:.* by zone.*client: <HOST>
 | 
			
		||||
 | 
			
		||||
# Option: ignoreregex
 | 
			
		||||
# Notes.: regex to ignore. If this regex matches, the line is ignored.
 | 
			
		||||
# Values: TEXT
 | 
			
		||||
#
 | 
			
		||||
ignoreregex =
 | 
			
		||||
@ -78,3 +78,12 @@ bantime = 3600
 | 
			
		||||
 | 
			
		||||
[ssh-ddos]
 | 
			
		||||
enabled  = true
 | 
			
		||||
 | 
			
		||||
[nginx-req-limit]
 | 
			
		||||
 | 
			
		||||
enabled = true
 | 
			
		||||
filter = nginx-req-limit
 | 
			
		||||
action = iptables-multiport[name=ReqLimit, port="http,https", protocol=tcp]
 | 
			
		||||
logpath = /var/log/nginx/*error.log
 | 
			
		||||
findtime = 600
 | 
			
		||||
bantime = 7200
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user