Community discussions

 
fbuster
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 55
Joined: Sat May 02, 2015 12:52 pm
Location: BE

Sounding the beeper when a LAN device pings the router

Tue Mar 19, 2019 9:00 pm

Could anyone help me with a script that sounds the beeper when a Lan device pings the router ?
 
2frogs
Long time Member
Long time Member
Posts: 540
Joined: Fri Dec 03, 2010 1:38 am

Re: Sounding the beeper when a LAN device pings the router

Wed Mar 20, 2019 2:58 pm

/ip firewall filter
add action=accept chain=input comment=pingcatch in-interface-list=LAN log=yes \
    log-prefix=Ping protocol=icmp

/system scheduler
add interval=1s name=pingbeep on-event=":global pingcont;\r\
    \n:if ([:len \$pingcont]=>0) do={:set \$pingcont [/ip firewal filter ge
    nd comment=\"pingcatch\"] packets]};\r\
    \n/ip firewall filter\r\
    \n:if ([get [find comment=\"pingcatch\"] packets]>\$pingcont) do={\r\
    \n:beep frequency=3000 length=100ms; :delay 100ms;\r\
    \n:beep frequency=250 length=100ms; :delay 100ms;\r\
    \n:beep frequency=2000 length=100ms; :delay 100ms;\r\
    \n:set \$pingcont (\$pingcont+1)}" policy=read,write,policy,test \
    start-time=startup
Last edited by 2frogs on Sun Mar 24, 2019 8:44 pm, edited 1 time in total.
 
fbuster
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 55
Joined: Sat May 02, 2015 12:52 pm
Location: BE

Re: Sounding the beeper when a LAN device pings the router

Sun Mar 24, 2019 5:52 pm

Thank you for sharing :D

Who is online

Users browsing this forum: No registered users and 10 guests