求助,关于PPTP自动修改路由表IP的问题
看过wwjun和zooyo老大的教程.发觉ADSL分流自动改路由表的脚本,可以修改成用来做pptp-out连接自动修改路由表的作用.
一下是原脚本:
:local assign-address
:local new-address
:local status
:local x
:set x 3--- 有几条ADSL 就填几...这里是3
:for i from=1 to=$x do={ ---- 执行从1 到 3 pppoe-out 的连接
:set status running]
:if ($status=true) do={
:set new-address address]
:set new-address [:pick $new-address 0 ([:len $new-address] -3)]
:set assign-address address]
:set assign-address [:pick $assign-address 0 ([:len $assign-address] -3)]
:if ($assign-address != $new-address) do={
/ip address set address=$new-address network=$new-address broadcast=$new-address
/ip route set gateway=$new-address
}
}
}
现在可以改成:
:local assign-address
:local new-address
:local status
:local x
:set x 3
:for i from=1 to=$x do={ :set status =("pptp-out" . $i)] running]
:if ($status=true) do={
:set new-address address]
:set new-address [:pick $new-address 0 ([:len $new-address] -3)]
:set assign-address address]
:set assign-address [:pick $assign-address 0 ([:len $assign-address] -3)]
:if ($assign-address != $new-address) do={ \
/ip address set address=$new-address network=$new-address broadcast=$new-address
/ip route set gateway=$new-address
}
}
}
}
请问各位有什么办法可以将comment的注释改成VPN1 VPN2???....不胜感激!
页:
[1]