Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am a newbie in MikroTik RouterOS.

How can I add a rule or script to beep when some one tries to connect to a special port on one of interfaces?

For example I need to know if someone is trying to ftp to my server from outside world.

share|improve this question
    
"I need to know if someone is trying to ftp to my server from outside world" <-- If it's connected to the Internet, then someone is attacking it. I guarantee it. –  Chris S Oct 29 '13 at 19:37

1 Answer 1

As far as I know, there is no way to do that directly.

Workaround could be using firewall rule to add source ip to addresslist:

/ip firewall filter add action=add-src-to-address-list address-list=beeplist
    address-list-timeout=1m1s chain=input disabled=no dst-port=21 protocol=tcp

and then run script to check'n'beep:

:if ([ :len [ip firewall address-list find where list=beeplist]]>0) do={:beep}

periodically via scheduler:

/system scheduler add interval=60s name=beeplist on-event=":if ([ :len [ip firewall address-list find where list=beeplist]]>0) do={:beep}"

Entries in address-list are going to be deleted via address-list-timeout settings.

Still, you are going to hear a lot of beeps...

share|improve this answer
3  
+1. Noone likely considers this a good feature to impolkement because mosst routers wont have anyone hearing them scream, being in cabinets, server rooms or - in the case of mikrotik - up on towers :) –  TomTom Oct 29 '13 at 19:27
    
Also, the last time I looked at firewall logs I get attacked a few times a minute. I might as well just set it to beep every few seconds, would but just as accurate. –  Chris S Oct 29 '13 at 19:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.