访问ros的5000端口,就在ip firewall address-list增加一个IP,实现重新拨号切换IP
:global aaa [/ip firewall address-list find list="changeip"];
:global k
:global a1
:global a2
do {
:foreach k in=$aaa do={
:set a1 (([/ip firewall address-list get $k address] & 0.0.255.0)<<16);
:set a2 [:pick $a1 0 [:find $a1 ".0"]];
/interface enable ("pptp" . $a2);
/ip firewall address-list remove $k;
:log error ("重新拨号pptp" . $a2 ."完毕!")
}
} while=$k
然后在sheduler,弄个10秒一执行上面的脚本。结束