Time based PPP connections

If you have a user that can only log into a PPP (L2TP, PPTP etc) session on a Mikrotik during a certain time period, you can create scripts that run on a schedule to enable the user at the desired time and disable the user when their work day ends.

Replace user.name with the name of the account you want to enable or disable

/ppp secret enable [/ppp secret find name=user.name]

/ppp secret disable [/ppp secret find name=user.name]

If the user has an active PPP session when their account is disabled the session will not be dropped and they will stay active. To get round this problem you can use the info on this page to remove an active connection. Merge the disable script and remove script to achieve the desired result.

Was this post helpful?

Total Page Visits: 1960 - Today Page Visits: 20