找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 3438|回复: 1

[基础] 求ROS 3.30下DDNS能用的脚本?

[复制链接]
发表于 2012-2-22 19:57:51 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

×
求那位能给个ros 3.30下DDNS能用的脚本?我试了好多都不行,但在2.927下能用,求高人
routeros
发表于 2012-3-12 01:22:13 | 显示全部楼层
/system scheduler
add comment="3322\B6\AF\CC\AC\D3\F2\C3\FB" disabled=no interval=10m name=\
    3322DNS on-event=":local ednsuser \"username\"\r\
    \n:local ednspass \"userpassword\"\r\
    \n:local ednshost \"username.3322.org\"\r\
    \n:local ednsinterface \"pppoe-out1\"\r\
    \n:local members \"http://members.3322.org/dyndns/update\?system=dyndns\"\
    \r\
    \n#:local members \"http://members.dyndns.org/nic/update\?\"\r\
    \n:local status\r\
    \n:local status [/interface get [/interface find  name=\$ednsinterface] ru\
    nning]\r\
    \n:if (\$status!=false) do={\r\
    \n:local ednslastip [:resolve \$ednshost]\r\
    \n:if ([ :typeof \$ednslastip ] = nil ) do={ :local ednslastip \"0\" }\r\
    \n:local ednsiph [ /ip address get [/ip address find interface=\$ednsinter\
    face ] address ]\r\
    \n:local ednsip [:pick \$ednsiph 0 [:find \$ednsiph \"/\"]]\r\
    \n:local ednsstr \"&hostname=\$ednshost&myip=\$ednsip\"\r\
    \n:if (\$ednslastip != \$ednsip) do={/tool fetch url=(\$members . \$ednsst\
    r) mode=http user=\$ednsuser password=\$ednspass dst-path=\$ednshost\r\
    \n:delay 2\r\
    \n:local result [/file get \$ednshost contents]\r\
    \n:log info (\$ednshost . \" \" .\$result)\r\
    \n/file remove \$ednshost ;\r\
    \n}\r\
    \n}\r\
    \n" policy=reboot,read,write,policy,test,sniff,sensitive start-date=\
    jan/01/1970 start-time=00:00:00
routeros
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|小黑屋|软路由 ( 渝ICP备15001194号-1|渝公网安备 50011602500124号 )

GMT+8, 2024-5-6 00:50 , Processed in 0.048973 second(s), 4 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表