找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
楼主: sen***

[分享]适用于OpenWRT/LEDE自带DDNS功能的阿里云脚本,完美嵌入

 火... [复制链接]
 楼主| 发表于 2018-2-24 23:24 | 显示全部楼层
llq_1983 发表于 2018-2-24 09:06
报错:wget 错误代码: '8'。  按照回复区的方式,删除重新建立还是不行
基础设置如下:
Lookup Hostname: ...

参数最后的Signature= 后面是空的?检查一下 openssl-util 有没有安装,签名HMAC值需要用它来计算。
如果是需要修改@记录,Domain:  @xxxxx.top,Lookup Hostname:xxxxx.top
如果是修改www记录,Domain:  www.xxxxx.top,Lookup Hostname:www.xxxxx.top
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-2-25 08:05 来自手机 | 显示全部楼层
感谢分享。。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-2-25 16:11 | 显示全部楼层
openssl-util 安装了,也使用update更新过,运行还是报错。
S-S R和广告插件在运行。关了后也一样报错


155719       : ************ ************** ************** **************
155719  note : PID '20446' started at 2018-02-25 15:57
155719       : ddns version  : 2.7.6-13
155719       : uci configuration:
ddns.ipv4.domain='www.stxxxxxxxxxxxxxxt.top'
ddns.ipv4.enabled='1'
ddns.ipv4.interface='wan'
ddns.ipv4.ip_interface='pppoe-wan'
ddns.ipv4.ip_source='interface'
ddns.ipv4.lookup_host='www.stxxxxxxxxxxxxxxt.top'
ddns.ipv4.password='5Cxxxxxxxxxxxxxxj5n'
ddns.ipv4.service_name='aliyun.com'
ddns.ipv4.username='LTxxxxxxxxxxxxxxhPb'
ddns.ipv4=service
155719       : verbose mode  : 0 - run normal, NO console output
155720       : check interval: 600 seconds
155720       : force interval: 259200 seconds
155720       : retry interval: 60 seconds
155720       : retry counter : 0 times
155720       : No old process
155720       : last update: never
155720       : Detect registered/public IP
155720       : #> /usr/bin/nslookup www.stxxxxxxxxxxxxxxt.top  >/var/run/ddns/ipv4.dat 2>/var/run/ddns/ipv4.err
155720       : Registered IP '222.2xx.xx1.113' detected
155720  info : Starting main loop at 2018-02-25 15:57
155721       : Detect local IP on 'interface'
155721       : #> ip -o addr show dev pppoe-wan scope global >/var/run/ddns/ipv4.dat 2>/var/run/ddns/ipv4.err
155721       : Local IP '222.2xx.1xx.113' detected on interface 'pppoe-wan'
155721       : Forced Update - L: '222.xx2.xx1.113' == R: '222.xx2.xx1.113'
155721       : parsing script '/usr/lib/ddns/update_aliyun_com.sh'
155722       : #> /usr/bin/wget-ssl -nv -t 1 -O /var/run/ddns/ipv4.dat -o /var/run/ddns/ipv4.err --no-proxy 'http://alidns.aliyuncs.com/?Action=DescribeSubDomainRecords&SubDomain=www.stxxxxxxxxxxxxxxt.top&Format=JSON&Version=2015-01-09&AccessKeyId=LTxxxxxxxxxxxxxxhPb&SignatureMethod=HMAC-SHA1&Timestamp=2018-02-25T07%3A57%3A21Z&SignatureVersion=1.0&SignatureNonce=d18a06ab-8763-4e44-b347-bc8a2535c569&Signature='
155722 ERROR : wget 错误代码: '8'
155722       : http://alidns.aliyuncs.com/?Acti ... 569&Signature=:
2018-02-25 15:57:22 ERROR 400: Bad Request.
155722  WARN : 传输失败 - 1/0 在 60 秒后重试
155823       : #> /usr/bin/wget-ssl -nv -t 1 -O /var/run/ddns/ipv4.dat -o /var/run/ddns/ipv4.err --no-proxy 'http://alidns.aliyuncs.com/?Action=DescribeSubDomainRecords&SubDomain=www.stxxxxxxxxxxxxxxt.top&Format=JSON&Version=2015-01-09&AccessKeyId=LTxxxxxxxxxxxxxxhPb&SignatureMethod=HMAC-SHA1&Timestamp=2018-02-25T07%3A58%3A23Z&SignatureVersion=1.0&SignatureNonce=599a83d2-4388-4659-8f1d-12a6dc354f2b&Signature='
155823 ERROR : wget 错误代码: '8'
155823       : http://alidns.aliyuncs.com/?Acti ... f2b&Signature=:
2018-02-25 15:58:23 ERROR 400: Bad Request.
155823  WARN : 传输失败 - 2/0 在 60 秒后重试

本帖子中包含更多资源

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

×

点评

和你情况一样,也是一直传输错误。这里的用户名和密码是 accessKeyId 和 accessKeySecret 吧 ?  详情 回复 发表于 2020-4-22 00:22
我日,和你情况一样,后来发现账号输错了  详情 回复 发表于 2019-10-4 22:41
SSH登录路由器,运行以下命令,然后把结果贴出来看看。  详情 回复 发表于 2018-2-25 18:17
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2018-2-25 18:17 | 显示全部楼层
llq_1983 发表于 2018-2-25 16:11
openssl-util 安装了,也使用update更新过,运行还是报错。
S-S R和广告插件在运行。关了后也一样报错

SSH登录路由器,运行以下命令,然后把结果贴出来看看。

  1. __SEPARATOR="&"
  2. __URLARGS='Action=DescribeSubDomainRecords&SubDomain=www.xxx.top&Format=JSON&Version=2015-01-09&AccessKeyId=LTxxxhPb&SignatureMethod=HMAC-SHA1&Timestamp=2018-02-25T07%3A57%3A21Z&SignatureVersion=1.0&SignatureNonce=d18a06ab-8763-4e44-b347-bc8a2535c569'

  3. string=$(echo -n "$__URLARGS" | sed 's/\'"${__SEPARATOR}"'/\n/g' | sort | sed ':label; N; s/\n/\'"${__SEPARATOR}"'/g; b label')
  4. echo $string

  5. signature=$(echo -n "$string" | openssl dgst -sha1 -hmac "${password}&" -binary)
  6. echo $signature
  7. signature=$(echo -n "$signature" | openssl base64)
  8. echo $signature

  9. unset __SEPARATOR __URLARGS string signature
复制代码
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-2-26 12:47 | 显示全部楼层
本帖最后由 air_zq 于 2018-2-26 12:56 编辑

想问下,阿里云解析里是如何配置的?


我的日志中报错
Mon Feb 26 12:38:06 2018 user.notice ddns-scripts[12196]: aliyun: PID '12196' started at 2018-02-26 12:38
Mon Feb 26 12:38:07 2018 user.warn ddns-scripts[12196]: aliyun: NO valid IP found
Mon Feb 26 12:38:07 2018 user.err ddns-scripts[12196]: aliyun: No or private or invalid IP '192.168.0.210' given! Please check your configuration
Mon Feb 26 12:38:07 2018 user.err ddns-scripts[12196]: aliyun: No update send to DDNS Provider

本帖子中包含更多资源

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

×

点评

你的问题是没有获取到有效外网IP。你是不是在内网路由上运行?去改一下高级设置里的IP地址来源类型  详情 回复 发表于 2018-2-26 23:00
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2018-2-26 23:00 | 显示全部楼层
air_zq 发表于 2018-2-26 12:47
想问下,阿里云解析里是如何配置的?

你的问题是没有获取到有效外网IP。你是不是在内网路由上运行?去改一下高级设置里的IP地址来源类型

点评

[attachimg]203388[/attachimg] 二级域名,这样设计正确么? 今天日志中出现了这个 不知是什么原因 Thu Mar 1 10:55:15 2018 user.err ddns-scripts[20117]: aliyun: wget 错误代码: '8' Thu Mar 1 10:55:1  详情 回复 发表于 2018-3-1 10:59
太感谢,已经完美运行了。  详情 回复 发表于 2018-2-27 11:54
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-2-27 11:54 | 显示全部楼层
sensel 发表于 2018-2-26 23:00
你的问题是没有获取到有效外网IP。你是不是在内网路由上运行?去改一下高级设置里的IP地址来源类型

太感谢,已经完美运行了。

点评

请问最后你阿里云的解析是如何设置?  详情 回复 发表于 2019-4-1 02:02
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-3-1 10:59 | 显示全部楼层
sensel 发表于 2018-2-26 23:00
你的问题是没有获取到有效外网IP。你是不是在内网路由上运行?去改一下高级设置里的IP地址来源类型


二级域名,这样设计正确么?
今天日志中出现了这个  不知是什么原因
Thu Mar  1 10:55:15 2018 user.err ddns-scripts[20117]: aliyun: wget 错误代码: '8'
Thu Mar  1 10:55:15 2018 user.warn ddns-scripts[20117]: aliyun: 传输失败 - 108/0 在 60 秒后重试
Thu Mar  1 10:56:16 2018 user.err ddns-scripts[20117]: aliyun: wget 错误代码: '8'
Thu Mar  1 10:56:16 2018 user.warn ddns-scripts[20117]: aliyun: 传输失败 - 109/0 在 60 秒后重试
Thu Mar  1 10:57:17 2018 user.err ddns-scripts[20117]: aliyun: wget 错误代码: '8'
Thu Mar  1 10:57:17 2018 daemon.info odhcpd[372]: Using a RA lifetime of 0 seconds on br-lan
Thu Mar  1 10:57:17 2018 user.warn ddns-scripts[20117]: aliyun: 传输失败 - 110/0 在 60 秒后重试
Thu Mar  1 10:58:17 2018 user.err ddns-scripts[20117]: aliyun: wget 错误代码: '8'
Thu Mar  1 10:58:17 2018 user.warn ddns-scripts[20117]: aliyun: 传输失败 - 111/0 在 60 秒后重试


本帖子中包含更多资源

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

×

点评

lookup hostname 是用于检测IP地址的域名,domain 是更新用域名。 一般情况下,这两者是相同的,即 lookup=yyy.xxx.top、domain=yyy.xxx.top。只有一种情况例外,即你需要修改的是 xxx.top 本身,那么 lookup=xxx.t  详情 回复 发表于 2018-3-1 11:43
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2018-3-1 11:43 | 显示全部楼层
air_zq 发表于 2018-3-1 10:59
二级域名,这样设计正确么?
今天日志中出现了这个  不知是什么原因
Thu Mar  1 10:55:15 2018 use ...

lookup hostname 是用于检测IP地址的域名,domain 是更新用域名。
一般情况下,这两者是相同的,即 lookup=yyy.xxx.top、domain=yyy.xxx.top。只有一种情况例外,即你需要修改的是 xxx.top 本身,那么 lookup=xxx.top、domain=@xxx.top。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-3-1 16:33 | 显示全部楼层
做个记号,谢谢楼主
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-3-17 13:59 | 显示全部楼层
35624       : #> /usr/bin/wget-ssl -nv -t 1 -O /var/run/ddns/myddns_ipv4.dat -o /var/run/ddns/myddns_ipv4.err --no-check-certificate --no-proxy 'https://alidns.aliyuncs.com/?Action=DescribeSubDomainRecords&SubDomain=%40.zhangtengfei.blog&Format=JSON&Version=2015-01-09&AccessKeyId=1502308474&SignatureMethod=HMAC-SHA1&Timestamp=2018-03-17T05%3A56%3A24Z&SignatureVersion=1.0&SignatureNonce=577e3cac-fd13-41d5-a535-c28fb3d5d398&Signature='
135625 ERROR : GNU Wget Error: '8'
135625       : WARNING: cannot verify alidns.aliyuncs.com's certificate, issued by 'CN=Symantec Class 3 Secure Server CA - G4,OU=Symantec Trust Network,O=Symantec Corporation,C=US':
  Unable to locally verify the issuer's authority.
https://alidns.aliyuncs.com/?Act ... 398&Signature=:
2018-03-17 13:56:25 ERROR 404: Not Found.
135625  WARN : Transfer failed - retry 1/1000 in 60 seconds
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2018-3-17 21:32 | 显示全部楼层
Signature=,检查 openssl-util 吧。或者是没安装,或者是安装了其它东西破坏了它的功能。。。
你可以尝试SSH进去 echo test | openssl dgst -sha1,看看会输出什么错误信息。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-3-21 03:59 | 显示全部楼层
感谢作者大神

安装的时候出现这个错误:
  1. root@OpenWrt:~# opkg install ddns-scripts_aliyun_1.0.0-1_all.ipk
  2. Installing ddns-scripts_aliyun (1.0.0-1) to root...
  3. Configuring ddns-scripts_aliyun.
  4. //usr/lib/opkg/info/ddns-scripts_aliyun.postinst: /usr/lib/opkg/info/ddns-scripts_aliyun.postinst-pkg: line 6: can't create /etc/ddns/services: nonexistent directory
  5. //usr/lib/opkg/info/ddns-scripts_aliyun.postinst: /usr/lib/opkg/info/ddns-scripts_aliyun.postinst-pkg: line 7: can't create /etc/ddns/services_ipv6: nonexistent directory
复制代码


DDNS服务提供商一栏中也找不到aliyun.com

ddns-scripts wget openssl-util luci-app-ddns
都已安装

点评

/etc/ddns/services 文件不存在。这2个是ddns-scripts的配置文件,可能ddns-scripts未安装成功,或者版本太旧。  详情 回复 发表于 2018-3-21 13:45
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2018-3-21 13:45 | 显示全部楼层
石头猫 发表于 2018-3-21 03:59
感谢作者大神

安装的时候出现这个错误:

/etc/ddns/services 文件不存在。这2个是ddns-scripts的配置文件,可能ddns-scripts未安装成功,或者版本太旧。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2018-3-23 00:05 | 显示全部楼层
已经安装了自带的ddns,需要先删除后再安装楼主的ipk包嘛,谢谢?

点评

不需要,直接安装就好。先安装依赖组件  详情 回复 发表于 2018-3-23 19:06
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

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

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-25 20:02

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

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