gxhacker 发表于 2008-9-24 22:59:13

ROS2.9.27 DDNS 可用代码

:log info "DDNS: Begin"

:global ddns-user "这里填用户名"
:global ddns-pass "这个填密码"
:global ddns-host "*1"
:global ddns-interface "PPPOE-OUT"←(注意这里改成自己外网连接的网卡,我用的是ADSL)

:global ddns-ip [ /ip address get address ]

:if ([ :typeof $ddns-lastip ] = nil ) do={ :global ddns-lastip 0.0.0.0/0 }

:if ([ :typeof $ddns-ip ] = nil ) do={

:log info ("DDNS: No ip address present on " . $ddns-interface . ", please check.")

} else={

:if ($ddns-ip != $ddns-lastip) do={

    :log info "DDNS: Sending UPDATE!"
    :log info [ /tool dns-update name=$ddns-host address=[:pick $ddns-ip 0 [:find $ddns-ip "/"] ] key-name=$ddns-user key=$ddns-pass ]
    :global ddns-lastip $ddns-ip

} else={

    :log info "DDNS: No change"

}

}

:log info "DDNS: End"

ROS 2.9.27上使用快1年了,没有任何问题。http://***.changeip.net

[ 本帖最后由 gxhacker 于 2008-9-24 23:05 编辑 ]

gxhacker 发表于 2008-9-24 23:00:59

占位置

ywc102816 发表于 2009-6-13 00:45:37

这个是什么网站的DDNS?

lxpwjhh 发表于 2010-1-8 09:57:32

????/
页: [1]
查看完整版本: ROS2.9.27 DDNS 可用代码