4.6 ddns 脚本
:global ddnsuser "用户名":global ddnspass "密码"
:global ddnshost "域名"
:global ddnsinterface "pppoe-out1"
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# END OF USER DEFINED CONFIGURATION
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:global ddnssystem ("mt-" . version] )
:global ddnsip [ /ip address get address ]
:global ddnslastip
:if ([:len ] = 0 ) do={ :log info "DDNS: No interface named $ddnsinterface, please check configuration." }
:if ([ :typeof $ddnslastip ] = "nothing" ) do={ :global ddnslastip 0.0.0.0/0 }
:if ([ :typeof $ddnsip ] = "nothing" ) do={
:log info ("DDNS: No ip address present on " . $ddnsinterface . ", please check.")
} else={
:if ($ddnsip != $ddnslastip) do={
:log info "DDNS: Sending UPDATE!"
:log info [ :put ] key-name=$ddnsuser key=$ddnspass ] ]
:global ddnslastip $ddnsip
} else={
:log info "DDNS: No changes necessary."
}
}
# END OF SCRIPT 4.6
script can be used if you have more than 1 WAN???? global ddnsinterface "pppoe-out1" 顶一下 通用代码,不知道兼容性如何~~,嘿嘿....马克一下,待会儿来try~ 我顶一下 顶 顶 不错不错 .
.
RouterOS 动态更新IP到 ChangeIP.com
RouterOS 动态更新IP到 DynDNS 谢谢楼主分享 弄来试试看
页:
[1]