Uncategorized

Asterisk: Fail2ban & IP Tables

https://www.voip-info.org/fail2ban-with-iptables-and-asterisk/

 

  1. /etc/init.d/fail2ban restart
  2. /etc/init.d/fail2ban reload
  3. /etc/init.d/iptables-persistent restart

When you reload or restart fail2ban all the bans are removed. 

 

One problem with this wonderful solution (which is related to iptables, not fail2ban), is that when you reboot your server all the rules and blocked IPs are deleted. On my case I want all this IPs permanent, so to accomplish this you run. 

# dpkg-reconfigure iptables-persistent

 

# iptables -S

And your rules will be maintained after reboot. 

 

Leave a Reply

Your email address will not be published. Required fields are marked *