Submitted by 熊茂祥 on 2012, September 14, 11:51 AM
DDNS脚本自动绑定到默认路由的接口更新IP
:global ddnsuser "用户名"
:global ddnspass "密码"
:global ddnshost "域名"
:global gate [/ip route get [/ip route find static=yes active=yes dynamic=yes distance=1] gateway]
:global ddnsinterface {:put [/ip add get [find network=$gate] interface]}
:global ddnsip [ /ip address get [/ip address find interface=$ddnsinterface] address ]
/tool dns-update name=$ddnshost address=[:pick $ddnsip 0 [:find $ddnsip "/"] ] key-name=$ddnsuser key=$ddnspass
» 阅读全文
Tags: ros, adsl, 多线, ddns, 脚本
ROS | 评论:0
| 阅读:33628
Submitted by 熊茂祥 on 2012, September 14, 11:45 AM
映射脚本自动绑定到默认路由的接口更新IP
--------------对NAT规则备注名进行查找-----------------
:global adcmname "3389"
:global adgw [/ip route get [/ip route find static=yes active=yes dynamic=yes distance=1] gateway]
:global ip [/ip add get [find network=$adgw] address]
:global newip [:pick $ip 0 [:find $ip "/"]]
:global oldip [/ip fi nat get [/ip fi nat find comment=$adcmname] dst-address]
:if ($newip != $oldip) do={
:log info [/ip fi nat set [/ip firewall nat find comment=$adcmname] dst-address=$newip]
}
» 阅读全文
Tags: ros, adsl, 多线, 映射, 脚本
ROS | 评论:0
| 阅读:35546