zheng58 发表于 2008-6-2 22:47:23

关于动态域名更新的问题

本个在changeip.com 成功注册了一个免费的域名,但是安如下的脚本不能自动更新,在ROS的日志里看能成功,但是重启动电脑后changeip.com上的IP还是原来的不变,请问大家帮帮我,global domainname "yourdomainname"(此位应填定什么?是changeip.com吗?)
:global domainzone "yourdomainzone"(此位应填定什么?是changeip给我的域名吗如XX.mywww.biz吗)


:if (=1) do={
:log info "DDNS: Creating Dynamic DNS update system."
:beep frequency=500
:global username "yourusername"
:global password "yourpassword"
:global domainname "yourdomainname"
:global domainzone "yourdomainzone"
}

:if (="") do={
:beep frequency=500 length=2s
:delay 4
:beep frequency=500 length=2s
:log warning "DDNS: No PPPoE is running."
} else={
:set intLocal [ /interface find type=pppoe-out running=yes ]
:set ipResolve ([:resolve ($domainname . "." . $domainzone)] . "/32")
:set ipLocal [ /ip address get [ /ip address find interface=$intLocal ] address ]
:if ($ipLocal != $ipResolve) do={
:log info ("DDNS: Resolved IP address : " . $ipResolve )
:log info ("DDNS: Local IP address : " . $ipLocal )
:log info ("DDNS: Sending Dynamic DNS update to server")
/tool dns-update zone=$domainzone name=$domainname key=$password key-name=$username address=[:pick $ipLocal 0 ([:len $ipLocal] - 3)]

/ip upnp set enabled=no
:delay 2
/ip upnp interfaces remove
/ip upnp interfaces remove
:delay 2
/ip upnp interfaces add interface= name] type=external
/ip upnp interfaces add interface=LAN type=internal
:delay 2
/ip upnp set enabled=yes
/ip upnp set allow-disable-external-interface=no
/ip upnp set show-dummy-rule=no
:delay 2
/ip fi man set dst-address=$ipLocal
:beep frequency=500
}
}
页: [1]
查看完整版本: 关于动态域名更新的问题