RouterOS script on PPP
Here I will share a code that I use to notify (using Telegram) each time a user connect a VPN tunnel. This code must be paste on PPP > Profiles > [your profile] > Scripts tab > On Up:
NOTIFICATION SYSTEM JOB START
{
:local RBtime [/system clock get time]
/tool fetch "https://api.telegram.org/botxxxxxxxxxxx/sendmessage?chat_id=-zzzzzz&text=Client vpn $user online $RBtime" keep-result=no;
};
WAIT FOR COUTING
:delay 2;
NOTIFICATION SYSTEM JOB END
Note:
botxxxxxxxxxxx and chat_id=-zzzzzz are code that must be create in Telegram using [BotFather]
Sort: Trending
Loading...