RouterOS script on PPP

in #routeos4 years ago

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:  
Loading...

Coin Marketplace

STEEM 0.09
TRX 0.30
JST 0.033
BTC 111087.14
ETH 3936.47
USDT 1.00
SBD 0.59