Here's some asterisk fail2ban info
List Banned IPs in Fail2Ban
Fail2Ban stores a list of all the IPs currently banned from connecting to your server. Run the following command to see all active jails on your server:
sudo fail2ban-client statusThe one you are probably interested in is "asterisk-iptables"
sudo fail2ban-client status asterisk-iptablesHere you'll see that 192.168.0.101 is banned. This was a phone that I couldn't make register.
Unban Specific IP in Fail2Ban
This command will let you unban an IP. In my example i'm going to unban 192.168.0.101 from the asterisk-iptables ban.
sudo fail2ban-client set asterisk-iptables unbanip 192.168.0.101Now you see that the "banned IP list" is blank.
Whitelist Specific IP in Fail2Ban
sudo nano -l /etc/fail2ban/jail.local- look for ignoreIP. There should be one in there already of 127.0.0.1/8
- Add a space and then add the additional IP(s) that you want
ignoreip = 127.0.0.1/8 192.168.0.101 192.168.0.102- Save the file and then reload Fail2Ban.
sudo systemctl reload fail2bansudo systemctl status fail2ban
No comments:
Post a Comment
Feel free to leave a comment! If you have any information that you think should be included, please do so here and I'll get it added in.