Hello guys, I’m developing with the PHP API mikrotik, and I’m having trouble setting the defualt value in the field local-address / remote-address in ppp / secret. For example: there is a following ip in local-address: 192.168.0.1 and I want to set it as default, that is, leave this field as an empty value.
I tried with this script, but to no avail, i would appreciate it if someone could help me:
<?php
require('../src/config/routeros_api.class.php');
require('../src/config/MikrotikConf.php');
$API = new RouterosAPI();
$config = new MikrotikConf();
$API->debug = false;
if ($API->connect($config->getIp(), $config->getLogin(), $config->getPass())) {
$value1 = 'remote-address';
$value2 = '*1';
$API->write('/ppp/secret/unset');
$API->write('=numbers=' . $value2, false);
$API->write('=value-name=' . $value1, false);
$API->read();
$API->disconnect();
}