已解决:看来又得再折腾了。ROS5.18升级到5.20后,DDNS用不了了。
本帖最后由 kzyfl 于 2012-9-28 12:26 编辑已解决,半个月都没远程了,现在终于搞成了,不是网卡聚合问题,也不是升级到5.20的问题,是DDNS动态域名自动被删除了,手动添加上去,现在好了。
真郁闷,正常用的二级域名,说删就删,在这里谴责一下。www.changeip.com
# HomingBeacon Main Dynamic DNS Update Script
# Written by Sam Norris, ChangeIP.com
# 20100728 Tested on RouterOS 4.9
# 20110511 Tested on RouterOS 5.2
# Set your specific ChangeIP.com preferences here.
:global ddnsuser "用户名"
:global ddnspass "密码"
:global ddnshost "域名"
# Change ddnsport to 8245 to bypass proxy.
:local ddnsport 80
# Do not edit anything below this line.You have been warned.
# Abusive updates to the system will cause firewall blocks.
# Please be considerate and
# do not let this script run more than once per 3-5 minutes.
:log info "DDNS: Starting."
# Initialize checkpoint
:global ddnscheckpoint
:if ([:typeof $ddnscheckpoint] = "time") do={
:log info ("DDNS: Last check was " . ( - $ddnscheckpoint))
} else={
:log info "DDNS: Cannot determine checkpoint, set now."
:global ddnscheckpoint ( - 1d )
}
# Get the current IP
:if ( - $ddnscheckpoint > [:totime 180s] || - $ddnscheckpoint < [:totime 0s]) do={
:log info "DDNS: Performing remote IP detection."
/tool fetch address="ip.changeip.com" host="ip.changeip.com" src-path=("/?" . ) dst-path="ip.changeip.com.txt" mode=http port=$ddnsport
:global ddnscheckpoint
} else={
:log info "DDNS: Please be considerate and wait a few seconds longer."
:break
}
# Parse the IP address received from fetch script.
:global ddnslastip
:local html
:local ddnsip [:pick $html ([:find $html "<!--IPADDR="] + 11) [:find $html "-->"] ]
# Is it a valid IP and is it different than the last one?
:if ([:typeof [:toip $ddnsip]] = "ip" AND $ddnsip != $ddnslastip ) do={
:log info "DDNS: Sending UPDATE with $ddnsip"
:log info
:global ddnslastip $ddnsip
} else={
:log info "DDNS: No update required."
}
}
脚本有问题.... sffqqq 发表于 2012-9-24 10:04 static/image/common/back.gif
脚本有问题....
5.18的时候可以正常用的,请问一下,哪个地方出现的问题. 问题更难琢磨了.我把版本还原到5.18,还是不行。最近就动过两次ROS,一次是升级到ROS 5.20,另一次是增加一块内网网卡,做双网卡bonding,用的是:balance-xor 模式。不会是内网网卡绑定引起的DDNS不能正常使用吧。 本帖最后由 kzyfl 于 2012-9-28 10:40 编辑
sffqqq 发表于 2012-9-24 10:04 static/image/common/back.gif
脚本有问题....
脚本本身应该没问题吧。原来一直用的正常,只是设定了双网卡内网聚合和升级到5.20后才出的问题,现在还原到ROS5。18了。这个DDNS的原理是,在ROS FTP根目录下建创建个记事本文件,ip.changeip.com.txt,如果外线PPPOE接口中的默认端口IP有变化,就更改记事本文件里面的IP值,然后通过脚本使二级域名绑记事要里面的IP,我测试过了,可以正常更新记事本里面的IP,就是不可以正常读取IP。记事本里面的内容为:123.14.58.111<!--IPADDR=123.14.58.111-->
付更新IP日志图: 如果没记错,如果你半年没有登陆changeip网站,就会删除你帐户下的域名(免费用户),且删除前会有邮件提醒 一般都没有问题,多到changeip.net查查更新记录。现几乎每月都有问题,说1小时恢复有可能要半天。
页:
[1]