Step 1 :
Install fail2ban in your server. Installation steps are described in http://ijasnahamed.blogspot.in/2015/03/install-and-setup-fail2ban-in.html from step 1 to step 6.
Step 2 :
Open jail.local file
vi /etc/fail2ban/jail.local
Step 3 :
In this file , under asterisk-iptables heading, it will be shown like this as below
[asterisk-iptables]
enabled = false
filter = asterisk
action = iptables-allports[name=ASTERISK, protocol=all]
sendmail-whois[name=Asterisk, dest=you@example.com, sender=fail2ban@example.com]
logpath = /var/log/asterisk/messages
maxretry = 5
or you may have
[asterisk]
enabled = false
filter = asterisk
action = iptables-multiport[name=asterisk-tcp, port="5060,5061", protocol=tcp]
iptables-multiport[name=asterisk-udp, port="5060,5061", protocol=udp]
sendmail-whois[name=Asterisk, dest=you@example.com, sender=fail2ban@example.com]
logpath = /var/log/asterisk/messages
maxretry = 10
Edit this to have parameters with followi…
Install fail2ban in your server. Installation steps are described in http://ijasnahamed.blogspot.in/2015/03/install-and-setup-fail2ban-in.html from step 1 to step 6.
Step 2 :
Open jail.local file
vi /etc/fail2ban/jail.local
Step 3 :
In this file , under asterisk-iptables heading, it will be shown like this as below
[asterisk-iptables]
enabled = false
filter = asterisk
action = iptables-allports[name=ASTERISK, protocol=all]
sendmail-whois[name=Asterisk, dest=you@example.com, sender=fail2ban@example.com]
logpath = /var/log/asterisk/messages
maxretry = 5
or you may have
[asterisk]
enabled = false
filter = asterisk
action = iptables-multiport[name=asterisk-tcp, port="5060,5061", protocol=tcp]
iptables-multiport[name=asterisk-udp, port="5060,5061", protocol=udp]
sendmail-whois[name=Asterisk, dest=you@example.com, sender=fail2ban@example.com]
logpath = /var/log/asterisk/messages
maxretry = 10
Edit this to have parameters with followi…