I recently ran into the problem of having to change the configuration of about 150 vpn clients.
They are all conntected to a RouterOS system runnning as ovpn-server.
To tackle the problem not having to access every client manually i tried the following script
Code: Select all
:foreach item in=[ /ip address find ] do={ :local network [ /ip address get $item network ];
/system ssh user=username address="$network" "/tool fetch address=VPN.VPN.VPN.VPN user=user password=password mode=ftp src-path=/conf.rsc dst-path=/conf.rsc
/import conf.rsc
/quit"
}
Has anyone any idea as to why this script would stop working?
Best Regards