mirror of
				https://github.com/mail-in-a-box/mailinabox.git
				synced 2025-11-03 19:30:54 +00:00 
			
		
		
		
	Exclude f2b sets
If you save the f2b set, it will stack them on restart. Adding grep -iv "f2b" will exclude any sets from fail2ban from being saved, so they append a single time properly
This commit is contained in:
		
							parent
							
								
									1ca7c0c6e1
								
							
						
					
					
						commit
						600ecb5356
					
				@ -72,7 +72,7 @@ save_rules()
 | 
				
			|||||||
    log_action_cont_msg " skipping IPset - no sets defined or not loaded"
 | 
					    log_action_cont_msg " skipping IPset - no sets defined or not loaded"
 | 
				
			||||||
  elif [ -x /usr/sbin/ipset ] || [ -x /sbin/ipset ]; then
 | 
					  elif [ -x /usr/sbin/ipset ] || [ -x /sbin/ipset ]; then
 | 
				
			||||||
    log_action_cont_msg " IPset"
 | 
					    log_action_cont_msg " IPset"
 | 
				
			||||||
    ipset save > /etc/iptables/rules.ipsets
 | 
					    ipset save | grep -iv "f2b"> /etc/iptables/rules.ipsets
 | 
				
			||||||
    if [ $? -ne 0 ]; then
 | 
					    if [ $? -ne 0 ]; then
 | 
				
			||||||
      rc=1
 | 
					      rc=1
 | 
				
			||||||
    fi
 | 
					    fi
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user