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?


/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