|
发表于 2014-7-29 08:55:38
|
显示全部楼层
我用着挺好的,每次都能正常联接,下面是我用的脚本
:global ddnsuser "你申请的用户名"
:global ddnspass "密码"
:global ddnshost "免费二级域名"
:global ddnsinterface "pppoe-out1"
:global ddnslastip
:global ddnsip [ /ip address get [/ip address find dynamic=yes interface=$ddnsinterface ] address ]
: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 [ /tool dns-update name=$ddnshost address=[:pick $ddnsip 0 [:find $ddnsip "/"] ] key-name=$ddnsuser key=$ddnspass ]
:global ddnslastip $ddnsip
} else={
:log info "DDNS: No change"
}
}
:log info "DDNS: End"
|
|