无论您在MikroTik上碰到什么问题,本站都可以为您排忧解难。远离烦恼,腾出您宝贵的精力和时间处理更加有价值的事情。 注册 | 登陆
浏览模式: 标准 | 列表2012年09月的文章

ROS的ADSL多线DDNS

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的ADSL多线映射脚本

映射脚本自动绑定到默认路由的接口更新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, 多线, 映射, 脚本