<div dir="ltr">That is is already under the hood. :)</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 13, 2015 at 11:23 AM, Michael Giagnocavo <span dir="ltr"><<a href="mailto:mgg@giagnocavo.net" target="_blank">mgg@giagnocavo.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Of perhaps some interest if you’re blocking a large amount of IP addresses (or whitelisting client IPs) is ipset.
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><a href="http://ipset.netfilter.org/" target="_blank">http://ipset.netfilter.org/</a><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Allows you to create a set then just have on rule in iptables. Plus has an atomic swap feature so you can build up new sets “offline” then flip them in.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">-Michael<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a> [mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a>]
<b>On Behalf Of </b>Sergey Safarov<br>
<b>Sent:</b> Friday, November 13, 2015 2:13 AM<span class=""><br>
<b>To:</b> FreeSWITCH Users Help <<a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a>><br>
</span><b>Subject:</b> Re: [Freeswitch-users] event based sipVicious blocker<u></u><u></u></span></p><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Think solution where INVITE mesages DROP/REJECT action will be implemented in mod_fail2ban is be have high pefomance<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Iprables is good solution, but cannot help for TLS connection.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">He is my iptables status where configure fail2ban. At present time 99% scans is made via UDP transport and 1% for TCP.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Chain f2b-freeswitch-local-tcp (1 references)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> pkts bytes target prot opt in out source destination <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 0 0 REJECT all -- * * 37.8.37.84
<a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 0 0 REJECT all -- * * 195.154.134.220 <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 0 0 REJECT all -- * * 188.227.169.113 <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 0 0 REJECT all -- * * 104.214.34.182
<a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 0 0 REJECT all -- * * 85.25.218.94
<a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 0 0 REJECT all -- * * 80.84.58.173
<a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 0 0 REJECT all -- * * 37.8.47.155 <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 0 0 REJECT all -- * * 23.239.65.132 <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 0 0 REJECT all -- * * 188.138.33.13 <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 0 0 REJECT all -- * * 188.138.33.113
<a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 0 0 REJECT all -- * * 80.84.55.178
<a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 0 0 REJECT all -- * * 188.227.170.157 <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 0 0 REJECT all -- * * 77.245.68.44
<a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 1 52 REJECT all -- * * 88.150.240.111
<a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 0 0 REJECT all -- * * 31.3.230.210
<a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 0 0 REJECT all -- * * 37.8.20.231 <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 0 0 REJECT all -- * * 213.136.75.235
<a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 0 0 REJECT all -- * * 195.154.177.146 <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 0 0 REJECT all -- * * 37.8.77.83
<a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 0 0 REJECT all -- * * 88.150.240.169
<a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 0 0 REJECT all -- * * 188.138.33.203
<a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 0 0 REJECT all -- * * 188.138.118.21
<a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 0 0 REJECT all -- * * 104.255.70.242
<a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 0 0 REJECT all -- * * 77.245.65.98
<a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 0 0 REJECT all -- * * 88.150.240.245
<a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 0 0 REJECT all -- * * 217.118.19.157
<a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 0 0 REJECT all -- * * 188.227.170.13
<a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 0 0 REJECT all -- * * 217.172.189.41
<a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 0 0 REJECT all -- * * 85.114.130.146
<a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 0 0 REJECT all -- * * 85.25.207.231 <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 6 252 RETURN all -- * * <a href="http://0.0.0.0/0" target="_blank">
0.0.0.0/0</a> <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Chain f2b-freeswitch-local-udp (1 references)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> pkts bytes target prot opt in out source destination <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 4 3122 REJECT all -- * * 37.8.37.84
<a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 0 0 REJECT all -- * * 195.154.134.220 <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 10 7949 REJECT all -- * * 188.227.169.113 <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 201 158K REJECT all -- * * 104.214.34.182
<a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 15 11677 REJECT all -- * * 85.25.218.94
<a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 11 8635 REJECT all -- * * 80.84.58.173
<a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 11 8649 REJECT all -- * * 37.8.47.155 <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 48 37438 REJECT all -- * * 23.239.65.132 <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 144 116K REJECT all -- * * 188.138.33.13 <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 42 33201 REJECT all -- * * 188.138.33.113
<a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 6 4699 REJECT all -- * * 80.84.55.178
<a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 75 61117 REJECT all -- * * 188.227.170.157 <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 130 104K REJECT all -- * * 77.245.68.44
<a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 133 108K REJECT all -- * * 88.150.240.111
<a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">29897 14M REJECT all -- * * 31.3.230.210
<a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 26 20426 REJECT all -- * * 37.8.20.231 <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 312 247K REJECT all -- * * 213.136.75.235
<a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 1133 612K REJECT all -- * * 195.154.177.146 <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 2 1570 REJECT all -- * * 37.8.77.83
<a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">85917 40M REJECT all -- * * 88.150.240.169
<a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 73 57484 REJECT all -- * * 188.138.33.203
<a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 64 50450 REJECT all -- * * 188.138.118.21
<a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 46 36467 REJECT all -- * * 104.255.70.242
<a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 3077 2388K REJECT all -- * * 77.245.65.98
<a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 21 16564 REJECT all -- * * 88.150.240.245
<a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 104 81759 REJECT all -- * * 217.118.19.157
<a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 95 75254 REJECT all -- * * 188.227.170.13
<a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 62 48840 REJECT all -- * * 217.172.189.41
<a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 2483 1974K REJECT all -- * * 85.114.130.146
<a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> 51 39876 REJECT all -- * * 85.25.207.231 <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> reject-with icmp-port-unreachable<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">2351K 1204M RETURN all -- * * <a href="http://0.0.0.0/0" target="_blank">
0.0.0.0/0</a> <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Sergey.<u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Fri, Nov 13, 2015 at 9:38 AM, jay binks <<a href="mailto:jaybinks@gmail.com" target="_blank">jaybinks@gmail.com</a>> wrote:<u></u><u></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<p class="MsoNormal">Doing it like you want is fine for education, however its not the best way, because it wont scale efficiently.<u></u><u></u></p>
<div>
<p class="MsoNormal">mod_sofia takes significant resources to consume a SIP Invite and generate events.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">iptables will stop Freeswitch having to process these INVITES, thus saving CPU.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">BUT you may not really care, if this is just for a home PBX.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Jay<u></u><u></u></p>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On 13 November 2015 at 14:18, Russell Treleaven <<a href="mailto:rtreleaven@bunnykick.ca" target="_blank">rtreleaven@bunnykick.ca</a>> wrote:<u></u><u></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<p class="MsoNormal">figured out how to use events without a socket and thought I would share.<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<div>
<p class="MsoNormal">my $con = new freeswitch::EventConsumer("CHANNEL_CREATE");<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">$con->bind(<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">"CUSTOM",<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">"sofia::pre_register"<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">);<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">while(my $e = $con->pop(1)) {<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">freeswitch::consoleLog(<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">"INFO",<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">$e->serialize . "\n"<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">);<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">}<u></u><u></u></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Wed, Nov 11, 2015 at 11:33 AM, Ken Rice <<a href="mailto:krice@freeswitch.org" target="_blank">krice@freeswitch.org</a>> wrote:<u></u><u></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Why not just block it with iptables?</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">iptables -I INPUT -j DROP -p udp --dport 5060 -m string --string "VaxSIPUserAgent" --algo bm</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">iptables -I INPUT -j DROP -p udp --dport 5060 -m string --string "friendly-scanner" --algo bm</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">iptables -I INPUT -j DROP -p udp --dport 5060 -m string --string "sipcli" --algo bm</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">iptables -I INPUT -j DROP -p udp --dport 5080 -m string --string "VaxSIPUserAgent" --algo bm</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">iptables -I INPUT -j DROP -p udp --dport 5080 -m string --string "friendly-scanner" --algo bm</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">iptables -I INPUT -j DROP -p udp --dport 5080 -m string --string "sipcli" --algo bm</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">these will get 99% of it because the script kiddies doing the scanning aren’t really that bright… there
may be some additional strings to want to block, but these work great when combined with fail2bans log parser</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">
<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a> [mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a>]
<b>On Behalf Of </b>Russell Treleaven<br>
<b>Sent:</b> Wednesday, November 11, 2015 10:29 AM<br>
<b>To:</b> FreeSWITCH Users Help <<a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a>><br>
<b>Subject:</b> [Freeswitch-users] event based sipVicious blocker</span><u></u><u></u></p>
<div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
<div>
<div>
<p class="MsoNormal">I am working on a freeswitch sipVicious blocker.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">I would like to run it from within freeswitch.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Is there a way to get events while running within freeswitch without running a socket via ESL::ESLconnection?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">#!/usr/bin/perl<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">use strict;<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">use warnings;<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">use ESL;<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">my $c = new ESL::ESLconnection(<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> "localhost",<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> "8021",<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> "ClueCon"<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">);<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">$c->events(<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> "plain",<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> "CHANNEL_CREATE CUSTOM sofia::pre_register"<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">);<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">while ($c->connected()) {<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> my $event = $c->recvEvent();<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">#do some stuff <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">}<u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<p class="MsoNormal">_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><u></u><u></u></p>
</blockquote>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<p class="MsoNormal"><br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><u></u><u></u></p>
</blockquote>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div>
<p class="MsoNormal"><span><span style="color:#888888">-- <u></u><u></u></span></span></p>
<div>
<p class="MsoNormal"><span style="color:#888888">Sincerely<br>
<br>
Jay</span><u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"><br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><u></u><u></u></p>
</blockquote>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div></div></div>
</div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br></div>