[Spce-user] UA filter
Andy Clark
andyclark05251978 at gmail.com
Thu Mar 14 10:14:46 EDT 2019
Hi Daniel,
i'm trying to implement UA filter using your online tutorial, unfortunately
after implantation i'm getting a 408 when trying to register
would you be able to look over the code
Thank you
https://www.sipwise.org/news/technical/securing-your-ngcp-against-sip-attacks/
if(!sanity_check("1511", "7"))
{
xlog("L_WARN", "Malformed SIP message detected - [% logreq_init -%]\n");
exit;
## filtering by UA : blacklist
if( is_method(“REGISTER|INVITE”) && ($ua =~ “friendly-scanner” || $ua =~
“sipvicious” || $ua =~ “^sipcli.+”) )
{
xlog(“L_WARN”, “Request rejected, malicious UA=’$ua’ from IP=$si – [%
logreq_init -%]\n”);
exit;
}
}
# checking if a request is a retransmission, if so it will exit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sipwise.com/mailman/private/spce-user_lists.sipwise.com/attachments/20190314/664abf41/attachment.html>
More information about the Spce-user
mailing list