How to kickoff pppoe user remotely

Since SNMP is RO, is there a way to kickoff online user?
Not from CLI, or is there a way to start script remotely and pass through paramteres.

Thanx,
Aleksandar

If trying to disconnect them from a RADIUS server, you could look into the “incoming RADIUS” feature on RouterOS - it’s made for that purpose. Search the forums here, this has been discussed.

Or you could of course make scripts that telnet/ssh into the router to execute the necessary console commands (that has been discussed here in great detail, too).

Best regards,
Christian Meis

You could start with this simple perl example


#!/usr/bin/perl

command line usage: perl this-script.pl pppoe_username

Works with MT 2.8

For MT 2.9 you need to change a couple of the commands but fundamentally works the same

use Net::Telnet;

Set Variables

$login = "someuser";
$password = "xxxxxx";
$host = "ip.add.re.ss";

$t = new Net::Telnet ( Timeout=>10, Errmode=>'die');

Login

$t->open($host);
$t->waitfor('/Login: $/i');
$t->print($login);
$t->waitfor('/Password: $/i');
$t->print($password);
$t->waitfor('/identity_goes_here] > $/i');

Run commands

$t->print('interface pppoe-server');
$t->print('remove [find user='.$ARGV[0].']');
$t->print('..');
$t->print('..');

Logout

$t->print('quit');