×
PPP Keepalive Ping - MikroTik Script RouterOS

PPP Keepalive Ping - MikroTik Script RouterOS

The goal
I recently ran into an issue where PPTP connections would drop packets after idle time of 00:01:00 (1 min). I wrote this little script to run within this time, which resets idle time to 00:00:00, effectively solving this issue.

The script

# Script: PPTP-KeepAlive
:local addr
/ppp active {
   :foreach i in=[find] do={
      :if ([get $i service] = "pptp") do={
         :set addr [get $i address]
         /ping ($addr) count=1
      }
   }
}
The schedule

/system scheduler
add comment="" disabled=no interval=45s name=PPTP-KeepAlive on-event=PPTP-KeepAlive policy=read,test start-time=startup
×

Notice!!

All Quantic user are requested to use our hybrid cloud drive for you project and Data base . We had added new module of cronjob to schedule and optimise your backup .