Community discussions

MikroTik App
 
samoell
just joined
Topic Author
Posts: 12
Joined: Thu Oct 27, 2016 9:16 am

Dude Attack Control

Sat Jan 21, 2017 9:11 pm

The Codes are using when your Interface goes under 100000 Bits and indeed its use full
i Was Wonder to know how can i make reverse of it
it Means when we get attack and huge amount of traffic.
i wana how can i make this when we get 1000000000bits
and let me know it
Thanks in advance






?xml version="1.0" ?>
<dude version="3.6">
<Probe>
<sys-type>13</sys-type>
<sys-id>20437</sys-id>
<sys-name>If_7_out_rate</sys-name>
<typeID>8</typeID>
<functionAvailable>If_7_out_rate() > -1</functionAvailable>
<functionError>if(If_7_out_rate() = -1,"SNMP Read Error",if(If_7_out_rate() > 1000000,"",concatenate("Warning Low outbound traffic rate on interface 7 the current rate = ",If_7_out_rate()," Bits per second")))</functionError>
<functionValue>If_7_out_rate()</functionValue>
<functionUnit>Bits/s</functionUnit>
</Probe>
</dude>
 
lebowski
Forum Guru
Forum Guru
Posts: 1619
Joined: Wed Aug 27, 2008 5:17 pm

Re: Dude Attack Control

Mon Jan 30, 2017 8:11 pm

The function for if_7_out_rate needs to have an if_7_in_rate that creates the correct bit rate for inbound traffic.

Duplicate your current low output rate probe and save it as "high input 7" (something else) and replace the error line with
if(If_7_in_rate() = -1,"SNMP Read Error",if(If_7_in_rate() > 1000000000,"",concatenate("Warning high inbound traffic rate on interface 7 the current rate = ",if_7_in_rate()," Bits per second")))
If you do not have a function for if_7_in_rate you should be able to use the out octets subtree in snmpwalk to find the in octets oid to create it from.

hth,
Lebowski

Who is online

Users browsing this forum: No registered users and 43 guests