找回密码
 加入我们
搜索
      
查看: 7814|回复: 25

[网络] noip 不愿意更新

[复制链接]
发表于 2023-9-4 11:05 | 显示全部楼层 |阅读模式
f3322.net废了,换了个noip,环境是ros+op,设置好倒是能外网访问了,但是我看noip后台好像根本不更新啊

网上抄的脚本如下

#定义 no.ip 相关设定,以下自行修改:

#============================================================
:local DDNSUser "no-ip帐号"
:local DDNSPassword "no-ip密码"
:local DDNSHost "申请的no-ip地址"

#============================================================
#以下程式如不了解,建议不要修改:

#------------------------------------------------------------------------------------------

#定义 IP 变量
:local DDNSIP
:global DDNSLastIP

#定义变量默认值
:if ([ :typeof $DDNSLastIP ] = nil ) do={ $DDNSLastIP "0.0.0.0" }

#利用HTTP查询Public IP
/tool fetch address=checkip.dyndns.com src-path=/ mode=http dst-path=("PublicIP");
:delay 1;

#读取档案
:set DDNSIP [/file get PublicIP contents];
:set DDNSIP [:pick $DDNSIP 0 [:find $DDNSIP "</body>"]];
:set DDNSIP [:pick $DDNSIP ([:find $DDNSIP ":"]+2) 100];

#删除档案
/file remove PublicIP;

#判断是否要更新 IP
:if ([ :typeof $DDNSIP ] = nil ) do={
:log error ("DDNS no.ip: 网络未取得 IP 位址")
} else={
:if ($DDNSIP != $DDNSLastIP) do={

# 更新 DDNS IP
:local url "/nic/update?hostname=$DDNSHost&myip=$DDNSIP"
/tool fetch address=dynupdate.no-ip.com src-path=$url mode=http user=$DDNSUser password=$DDNSPassword dst-path=("DDNS_no_ip")
:delay 1

# 档案内容
:local filestr [ /file get "DDNS_no_ip" contents];

# 删除档案
:local filename [ /file find name="DDNS_no_ip"];
/file remove $filename

# 变更是否成功
:if ( [ :find $filestr "good"] = "0" || [ :find $filestr "nochg"] = "0" ) do={
:log warning ("DDNS no.ip: 网络更新 IP 位址 " . $DDNSIP)
:set DDNSLastIP $DDNSIP
} else={
:log error ("DDNS no.ip: 网络更新 IP 位址失败 " . $DDNSIP)
}
}
}


脚本2如下

#===========no-ip資訊=============
:local user "abc1234@gmail.com"
:local pass "123456"
:local host "abc1234.no-ip.org"
:local wan "pppoe-out1"
#===============================
:local public [/ip address get [find interface=$wan] address]
:set public [:toip [:pick $public 0 [:find $public "/"]]]

:global noip
:if ([:typeof $noip]!="ip") do={:set noip [:resolve $host]}

:if ($public!=$noip) \
do={
/tool fetch url="http://dynupdate.no-ip.com/nic/update\\3Fmyip=$public&hostname=$host" \
user=$user password=$pass mode=http dst-path=ddns-noip
/file remove ddns-noip
:set noip $public
:log warning "Update $host : $noip => $public"
}



1,是ros脚本的问题??
2,还是 noip现在就这样的作风??
发表于 2023-9-4 11:25 | 显示全部楼层
阿里云不是蛮好,买个域名也不贵
发表于 2023-9-4 11:44 | 显示全部楼层
f3322设置好后当时是可以访问,过一天左右就不行了,看f3322后台IP也是几天前的根本不更新的。你的noip估计也这样问题
发表于 2023-9-4 12:14 来自手机 | 显示全部楼层
大概率网络问题,curl命令加代理参数
 楼主| 发表于 2023-9-4 12:16 | 显示全部楼层
sdren2004 发表于 2023-9-4 11:44
f3322设置好后当时是可以访问,过一天左右就不行了,看f3322后台IP也是几天前的根本不更新的。你的noip估计 ...

不是,我的f3322后台一直可以更新,就是ping不通而已,现在公云改了免费域名了,f3322.net免费域名应该是作废了,改成x3322.net这个免费域名已经恢复正常了
发表于 2023-9-4 12:16 | 显示全部楼层
f3322.net已经被ban了,建议更换为alidns
发表于 2023-9-4 13:27 | 显示全部楼层
买个十年的域名最稳,或者直接用tplink送的tpddns
发表于 2023-9-4 15:11 | 显示全部楼层
NOIP現在還有不換IP會被關閉的強制性要求嗎.....
 楼主| 发表于 2023-9-5 23:01 | 显示全部楼层
xsdianeht 发表于 2023-9-4 13:27
买个十年的域名最稳,或者直接用tplink送的tpddns

tp的就必须只能用它的路由器了吧
发表于 2023-9-5 23:11 | 显示全部楼层
域名是cloudflare解析,目前用网上的脚本通过API更新,crontab5分钟更新一次测试下来没什么问题
 楼主| 发表于 2023-9-6 09:17 | 显示全部楼层
LightFocus 发表于 2023-9-5 23:11
域名是cloudflare解析,目前用网上的脚本通过API更新,crontab5分钟更新一次测试下来没什么问题 ...

意思是我需要把noip申请的域名绑定到cloudflare上做解析吗?
发表于 2023-9-6 12:30 | 显示全部楼层
415793633 发表于 2023-9-6 09:17
意思是我需要把noip申请的域名绑定到cloudflare上做解析吗?

哪里买的域名不重要,只要dns解析是cloudflare完成,然后用cloudflare的api更新dns记录就行
发表于 2023-9-6 12:35 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2023-9-6 12:36 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2023-9-6 22:03 | 显示全部楼层
今天x3322.net也寄了
发表于 2023-9-6 23:04 来自手机 | 显示全部楼层
中兴路由里自带的noip ddns更新无效,noip的pc客户端duc运行会报错(爬梯后不报错但是ip就不对了),但貌似时不时能更新ip
 楼主| 发表于 2023-9-7 08:39 | 显示全部楼层
sdren2004 发表于 2023-9-6 22:03
今天x3322.net也寄了

就是前天下午突然官网都无法打开,以为彻底挂了,结果我的x3322直到今天还是正常
发表于 2023-9-7 15:03 | 显示全部楼层
可以试试dynv6, noip每月还要激活一次太麻烦了。
 楼主| 发表于 2023-9-7 18:35 | 显示全部楼层
BrainBUGs 发表于 2023-9-7 15:03
可以试试dynv6, noip每月还要激活一次太麻烦了。

已经注册好dynv6的域名了,但是好死不死,公云还能用,就暂时先继续用着公云,出问题再转过去
发表于 2023-9-8 00:57 | 显示全部楼层
dynv6挺好的,或者eu.org,这个可以挂到cloudflare,就是申请通过时间有点久,有时得个把月才通过
发表于 2023-9-8 08:17 来自手机 | 显示全部楼层
买个 数字+xyz 的十年也才几十块
发表于 2023-9-8 09:09 | 显示全部楼层
本帖最后由 mysy 于 2023-9-8 09:14 编辑

ros的 no-ip是可以用的,主要是两个问题,权限和版本。

# No-IP automatic Dynamic DNS update
#
#--------------- Change Values in this section to match your setup ------------------

# No-IP User account info
:local noipuser "xxxxxx"
:local noippass "xxxxxxx"

# Set the hostname or label of network to be updated.
# Hostnames with spaces are unsupported. Replace the value in the quotations below with your host names.
# To specify multiple hosts, separate them with commas.
:local noiphost "xxxxxxxx"

# Change to the name of interface that gets the dynamic IP address
:local inetinterface "xxxxxxxx"

#------------------------------------------------------------------------------------
# No more changes need

:local previousIP

if ( [:len [/file find name=("no-ip_ddns_previousip.txt")]] > 0 ) do={
:set previousIP [/file get ("no-ip_ddns_previousip.txt") contents]
}


:if ([/interface get $inetinterface value-name=running]) do={
# Get the current IP on the interface
:local currentIP [/ip address get [find interface="$inetinterface" disabled=no] address]

# Strip the net mask off the IP address
:for i from=( [:len $currentIP] - 1) to=0 do={
:if ( [:pick $currentIP $i] = "/") do={
:set currentIP [:pick $currentIP 0 $i]
}
}

:if ($currentIP != $previousIP) do={
:log info "No-IP: Current IP ($currentIP) is not equal to previous IP ($previousIP), update needed"

# The update URL. Note the "\3F" is hex for question mark (?). Required since ? is a special character in commands.
:local url "http://dynupdate.no-ip.com/nic/update\3Fmyip=$currentIP"
:local noiphostarray
:set noiphostarray [:toarray $noiphost]
:foreach host in=$noiphostarray do={
:log info "No-IP: Sending update for $host"
/tool fetch url=($url . "&hostname=$host") user=$noipuser password=$noippass mode=http dst-path=("no-ip_ddns_update-" . $host . ".txt")
:log info "No-IP: Host $host updated on No-IP with IP $currentIP"
/file print file=("no-ip_ddns_previousip.txt")
:delay 3
/file set contents="$currentIP" ("no-ip_ddns_previousip.txt")
}
} else={
:log info "No-IP: Previous IP $previousIP is equal to current IP, no update needed"
}
} else={
:log info "No-IP: $inetinterface is not currently running, so therefore will not update."
}

屏幕截图 2023-09-08 091408.png
发表于 2023-9-8 09:24 | 显示全部楼层
还是注册个域名吧,不想实名的话注册在cloudflare或者godday上,配合DDNS-GO项目,无论是V4还是V6都解析很快
发表于 2023-9-8 09:43 | 显示全部楼层
用每步毫无问题
发表于 2023-9-8 10:56 | 显示全部楼层
用cloudflare api,没什么问题
发表于 2023-9-8 12:19 | 显示全部楼层
noip要经常上去确认一下才能继续用,很不方便。
您需要登录后才可以回帖 登录 | 加入我们

本版积分规则

Archiver|手机版|小黑屋|Chiphell ( 沪ICP备12027953号-5 )沪公网备310112100042806 上海市互联网违法与不良信息举报中心

GMT+8, 2025-4-29 18:30 , Processed in 0.014562 second(s), 6 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2007-2024 Chiphell.com All rights reserved.

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