ROS5.X在3322pubyun上能使用的DDNS动态域名脚本也在5.20上测试通 3322 ddns

:local ednsuser "lpwuser"

:local ednspass "lpwpasswd"

:local ednshost "lpw.f3322.org"

:local ednsinterface "pppoe-out1"

ROS5.X在3322pubyun上能使用的DDNS动态域名脚本也在5.20上测试通 3322 ddns

:local members "http://members.3322.org/dyndns/update?system=dyndns"

#:local members "http://members./nic/update?"

:local status

:local status [/interface get [/interface findname=$ednsinterface] running]

:if ($status!=false) do={

:local ednslastip [:resolve $ednshost]

:if ([ :typeof $ednslastip ] = nil ) do={ :local ednslastip "0"}

:local ednsiph [ /ip address get [/ip address findinterface=$ednsinterface ] address ]

:local ednsip [:pick $ednsiph 0 [:find $ednsiph "/"]]

:local ednsstr "&hostname=$ednshost&myip=$ednsip"

:if ($ednslastip != $ednsip) do={

/tool fetch url=($members . $ednsstr) mode=http user=$ednsuserpassword=$ednspass dst-path=$ednshost

:delay 2

:local result [/file get $ednshost contents]

:log info ($ednshost . " " .$result)

/file remove $ednshost ;

}

}

#原文件来自http://hi.baidu.com/lpwok/item/70afab1eb90705e05f53b106

  

爱华网本文地址 » http://www.aihuau.com/a/25101010/28096.html

更多阅读

声明:《ROS5.X在3322pubyun上能使用的DDNS动态域名脚本也在5.20上测试通 3322 ddns》为网友全部的海分享!如侵犯到您的合法权益请联系我们删除