On first step backup & expor the config, check if this simulate the correct results, this do nothig, simple print what must we do.
:foreach user in=[/ppp secret find where (remote-address in 172.19.0.0/18)] do={
:local usr [/ppp secret get $user name]
:set usr [:pick "$usr " 0 30]
:local old [/ppp secret get $user remote-address]
:local new (($old & 0.0.255.255) | 192.19.0.0)
:put "$usr$old\t->\t$new"
# /ppp secret set $user remote-address=$new
}
But 172.19.0.0/18 is go from 172.19.0.0 to 172.19.63.255, 172.19.64.0/24 is not covered...
You need also the 172.19.64.0/24 from 172.19.64.0.0 to 172.19.64.255?
Replace
(remote-address in 172.19.0.0/18)
with
((remote-address in 172.19.0.0/18) or (remote-address in 172.19.64.0/24))
Triple check the results.
All is at your own risk.
If all is working as expected, apply the changes relaunching the script removing the comment "#" in front of /ppp...