|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
×
本帖最后由 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 " . ([/system clock get time] - $ddnscheckpoint))
} else={
:log info "DDNS: Cannot determine checkpoint, set now."
:global ddnscheckpoint ( [/system clock get time] - 1d )
}
# Get the current IP
:if ([/system clock get time] - $ddnscheckpoint > [:totime 180s] || [/system clock get time] - $ddnscheckpoint < [:totime 0s]) do={
:log info "DDNS: Performing remote IP detection."
/tool fetch address="ip.changeip.com" host="ip.changeip.com" src-path=("/?" . [/int eth get 0 mac-address ]) dst-path="ip.changeip.com.txt" mode=http port=$ddnsport
:global ddnscheckpoint [/system clock get time]
} 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 [/file get "ip.changeip.com.txt" contents]
: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 [/tool dns-update name=$ddnshost address=$ddnsip key-name=$ddnsuser key=$ddnspass ]
:global ddnslastip $ddnsip
} else={
:log info "DDNS: No update required."
}
}
|
|