Community discussions

MikroTik App
 
tigro11
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 87
Joined: Tue Feb 20, 2018 12:31 am

cript sending email attack ports

Tue Jul 24, 2018 1:58 pm

hi guys, is there a script that can send me an email when an attack on the doors comes?
thank you all
 
User avatar
BartoszP
Forum Guru
Forum Guru
Posts: 2879
Joined: Mon Jun 16, 2014 1:13 pm
Location: Poland

Re: cript sending email attack ports

Tue Jul 24, 2018 2:06 pm

How do you detect that your router is attacked?
 
tigro11
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 87
Joined: Tue Feb 20, 2018 12:31 am

Re: cript sending email attack ports

Tue Jul 24, 2018 4:20 pm

I put port scanner rules, when it finds an ip that scans ports, it blocks ip that generated the scan for 30 days
 
User avatar
BartoszP
Forum Guru
Forum Guru
Posts: 2879
Joined: Mon Jun 16, 2014 1:13 pm
Location: Poland

Re: cript sending email attack ports

Tue Jul 24, 2018 4:57 pm

So you need in the script check if address-list which you use to block IPs is empty or not and then send an e-mail.
 
tigro11
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 87
Joined: Tue Feb 20, 2018 12:31 am

Re: cript sending email attack ports

Tue Jul 24, 2018 5:22 pm

exactly, maybe even with the list of blocked ips.
is this possible?
 
User avatar
amt
Long time Member
Long time Member
Posts: 529
Joined: Fri Jan 16, 2015 2:05 pm

Re: cript sending email attack ports

Wed Jul 25, 2018 2:37 pm

I put port scanner rules, when it finds an ip that scans ports, it blocks ip that generated the scan for 30 days
what rules do you use for port scanners ?
 
tigro11
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 87
Joined: Tue Feb 20, 2018 12:31 am

Re: cript sending email attack ports

Wed Jul 25, 2018 4:27 pm

I use these rules together with other filters

add chain=input protocol=tcp psd=21,3s,3,1 action=add-src-to-address-list address-list="port scanners" address-list-timeout=2w comment="Port scanners to list " disabled=no
add chain=input protocol=tcp tcp-flags=fin,!syn,!rst,!psh,!ack,!urg action=add-src-to-address-list address-list="port scanners" address-list-timeout=2w comment="NMAP FIN Stealth scan"
add chain=input protocol=tcp tcp-flags=fin,syn action=add-src-to-address-list address-list="port scanners" address-list-timeout=2w comment="SYN/FIN scan"
add chain=input protocol=tcp tcp-flags=syn,rst action=add-src-to-address-list address-list="port scanners" address-list-timeout=2w comment="SYN/RST scan"
add chain=input protocol=tcp tcp-flags=fin,psh,urg,!syn,!rst,!ack action=add-src-to-address-list address-list="port scanners" address-list-timeout=2w comment="FIN/PSH/URG scan"
add chain=input protocol=tcp tcp-flags=fin,syn,rst,psh,ack,urg action=add-src-to-address-list address-list="port scanners" address-list-timeout=2w comment="ALL/ALL scan"
add chain=input protocol=tcp tcp-flags=!fin,!syn,!rst,!psh,!ack,!urg action=add-src-to-address-list address-list="port scanners" address-list-timeout=2w comment="NMAP NULL scan"
add chain=input src-address-list="port scanners" action=drop comment="dropping port scanners" disabled=no

Who is online

Users browsing this forum: GoogleOther [Bot] and 24 guests