访脚本的主要功能是,3322 DDNS更新
方法如下;
1、在/System Script下添加如下脚本内容
:local ednsuser "user" :local ednspass "password" :local ednshost "xxx.3322.org" :local ednsinterface "pppoe-out1" :local members "http://members.3322.org/dyndns ... ot%3B #:local members "http://members.dyndns.org/nic/update?" :local status :local status [/interface get [/interface find name=$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 find interface=$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=$ednsuser password=$ednspass dst-path=$ednshost :delay 2 :local result [/file get $ednshost contents] :log info ($ednshost . " " .$result) /file remove $ednshost ; } }
脚本名称命名为3322
2、在/System Scheduler下添加一个脚本定时,名称为3322,内容为3322,执行时间为10分钟(时
间可自定义)
注意:单线单拨可用
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。