Community discussions

MikroTik App
 
marcelofares
Member Candidate
Member Candidate
Topic Author
Posts: 129
Joined: Tue Mar 03, 2015 2:26 pm

Script to automatically disable L2TP

Sat Dec 16, 2023 3:18 pm

I'm trying to disable the L2TP protocol every day at 11 pm and enable it the next day at 6 am. I tried to do it this way but just disabling the VPN interface doesn't work. I need to disable the L2TP protocol via Script and automate via scheduler. Could anyone help me create this script?
You do not have the required permissions to view the files attached to this post.
 
optio
Long time Member
Long time Member
Posts: 675
Joined: Mon Dec 26, 2022 2:57 pm

Re: Script to automatically disable L2TP

Sun Dec 17, 2023 1:35 pm

/system/scheduler
add interval=24h name=l2tp_enable on-event="/interface/l2tp-server/server set enabled=yes" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-time=06:00:00
add interval=24h name=l2tp_disable on-event="/interface/l2tp-server/server set enabled=no" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-time=23:00:00

Who is online

Users browsing this forum: No registered users and 4 guests