SIP2Ban is A Avoided SIP attackers in Asterisk and OpenSIPS.

SIP2Ban is A Avoided SIP attackers in Asterisk and OpenSIPS.

SIP2Ban is A Avoided SIP attackers in Asterisk and OpenSIPS.

Avoided SIP and RTP attackers in Asterisk and OpenSIPS

Avoided SIP and RTP attackers in Asterisk and OpenSIPS

How to run a file:
Download files in your server
# git clone https://github.com/chanon-m/sip2ban.github.io.git

Copy sip2ban.pl to /etc
# cp ./sip2ban.github.io/sip2ban.pl /etc

Make a file executable
# chmod 755 /etc/sip2ban.pl

Create a crontab job on your server
If you want sip2ban.pl to run every 5 minutes, you should code the time as:

# crontab -e
*/5 * * * * /etc/sip2ban.pl >> /var/log/sip2ban.log&

Copy sip2ban_opensips.pl to /etc
# cp ./sip2ban.github.io/sip2ban_opensips.pl /etc

Make a file executable
# chmod 755 /etc/sip2ban_opensips.pl
+ Add codes in opensips.cfg
Original opensips.cfg :

In your opensips.cfg, you have to add:

Code :

Unauthorized attacks
Add codes in opensips.cfg, Original opensips.cfg :

In your opensips.cfg, you have to add:

RTP without registration attacks
Add codes in opensips.cfg, Original opensips.cfg:

In your opensips.cfg, you have to add:

–Create a crontab job on your server
If you want sip2ban_opensips.pl to run every 5 minutes, you should code the time as:

TIP – Set QOS in CentOS
Add new rules in iptables (Please make sure your switchhub doesn’t remove dscp value)

–Restart and monitor

 

Download : Master.zip  | Clone Url
Source : sip2ban
Author : Chanon Mingsuwan | Reported bugs or requested new feature can be sent to chanonm@live.com