PPP Profile Script On Up:
Code: Select all
:local DateTime ([/system clock get date] . " - " . [/system clock get time] . " ");
:local PPPProfileFile [/file get flash/PPPProfile.txt contents];
:local PPPProfileLog ($DateTime . $user . " connect with private IP address " . $"remote-address" . " from " . $"caller-id");
:set PPPProfileFile ($PPPProfileFile . "\r\n" . $PPPProfileLog);
/file set flash/PPPProfile.txt contents=$PPPProfileFile;
Code: Select all
:local UserUpTime [/interface pptp-server get $interface uptime];
:local DateTime ([/system clock get date] . " - " . [/system clock get time] . " ");
:local PPPProfileFile [/file get flash/PPPProfile.txt contents];
:local PPPProfileLog ($DateTime . $user . " disconnect. Uptime connection - " . $UserUpTime);
:set PPPProfileFile ($PPPProfileFile . "\r\n" . $PPPProfileLog);
/file set flash/PPPProfile.txt contents=$PPPProfileFile;