免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
1234下一页
最近访问板块 发新帖
查看: 12603 | 回复: 32
打印 上一主题 下一主题

说说3322动态域名在使用中遇到的一些问题(感谢hefish) [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2004-06-06 22:35 |只看该作者 |倒序浏览
root总收到信,内容包括“Incorrectly built binary which accesses errno or h_errno directly. Needs to be fixed.”

这个是ez-update客户端的问题,还是别的什么?

如何让这个信息不发送到ROOT里呢?

我已经加了-q参数(be quiet),但
Incorrectly built binary which accesses errno or h_errno directly. Needs to be fixed.
还是有

/etc/crontab里修改了MAILTO=root,已经去掉了,也不行……

论坛徽章:
0
2 [报告]
发表于 2004-06-06 23:01 |只看该作者

说说3322动态域名在使用中遇到的一些问题(感谢hefish)

问题解决了
原来总会在root信箱里收到
Incorrectly built binary which accesses errno or h_errno directly. Needs to be fixed.
no update needed at this time

现在不会有了

解决步骤:

1、去下载一个ez-ipupdate源码包
http://www.3322.org/dyndnspage/ez-ipupdate-3.0.10.tgz

2、解压,修改代码
tar xzvf ez-ipupdate-3.0.10.tgz
cd ez-ipupdate-3.0.10

vi conf_file.c
添加代码

  1. #include <errno.h>;
复制代码


vi ez-ipupdate.c
查找“no update needed at this time”
注释掉那几行

  1. //    else
  2. //    {
  3. //      fprintf(stderr, "no update needed at this time\n");
  4. //    }
复制代码


3、编译,安装
./configure
make
make install

4、修改crontab,原有命令加个-q参数(be quiet)

论坛徽章:
0
3 [报告]
发表于 2004-06-06 23:05 |只看该作者

说说3322动态域名在使用中遇到的一些问题(感谢hefish)

附:

希网动态域名更新协议
http://www.3322.org/dyndnspage/protocol.html

希网动态域名——相关协议

  1. Client的请求应该使用HTTP/1.0以上协议,Server的相应一定为HTTP/1.0

  2. 支持HTTP和基于SSL的HTTPS协议

  3. 需要事务处理,Client发送完整的请求,并且解析服务器端的相应,保证域名更新的成功

  4. 1. 通过URL认证 (所有的在一行)
  5. http://username:password@members.3322.org/dyndns/update?system=dyndns&hostname=yourhost.ourdomain.ext&myip=ipaddress&wildcard=OFF
  6. &mx=mail.exchanger.ext&backmx=NO&offline=NO

  7. 2. HTTP GET 请求
  8. 1) dyndns, statdns
  9. GET /dyndns/update?system=statdns&hostname=yourhost.ourdomain.ext
  10. &myip=ipaddress&wildcard=OFF&mx=mail.exchanger.ext&backmx=NO
  11. &offline=NO HTTP/1.1
  12. Host: members.3322.org
  13. Authorization: Basic username:pass
  14. (note: username:pass must be encoded in base64)
  15. User-Agent: myclient/1.0 me@null.net

  16. 2) webhop
  17. GET /dyndns/update?system=webhop&hostname=yourhost.ourdomain.ext&url=dest_url
  18. &title=cloak_title&cloak=cloak HTTP/1.1
  19. Host: members.3322.org
  20. Authorization: Basic username:pass
  21. (note: username:pass must be encoded in base64)
  22. User-Agent: myclient/1.0 me@null.net

  23. 3) subdom
  24. GET /dyndns/update?system=subdom&hostname=yourhost.ourdomain.ext&ip1=address1&ip2=address2 HTTP/1.1
  25. Host: members.3322.org
  26. Authorization: Basic username:pass
  27. (note: username:pass must be encoded in base64)
  28. User-Agent: myclient/1.0 me@null.net


  29. username:password System:All Optional: No
  30. 用户名和密码用来登录

  31. system=dyndns|statdns|webhop|subdom System:All Optional: Yes
  32. 只能使用二者之一,否则出错。如果没有这个参数,缺省是dyndns
  33. (webhop, subdomain只能使用web更新,而用户自己的域名(3322.org的custom方式)
  34. 可以归并到现有的四种方式)

  35. hostname=host.3322.org System:All Optional: No
  36. 需要更新的域名

  37. myip=ipaddr System:All Optional: Yes
  38. 域名对应的IP。如果不指定,则服务器将选择最佳的IP(一些Proxy会传递客户端的IP,
  39. 这会被服务器检测到)。如果传递的地址格式错误,则忽略这个参数,而用服务器检测
  40. 到的IP。

  41. wildcard=ON|OFF System:DynDNS, StatDNS Optional: Yes
  42. 是否支持通配符,缺省为OFF。ON意为着 *.host.3322.org等同于host.3322.org

  43. mx=mailexchanger System:DynDNS, StatDNS Optional: Yes
  44. 指明Mail eXchanger。必须能够解析到一个IP,否则被忽略。如果不提供该参数或者
  45. 不能解析到一个IP,mx记录会被删除。

  46. backmx=YES|NO System:DynDNS, StatDNS Optional: Yes
  47. 指明前面的mx参数会被设置成备份邮件服务器,即邮件会首先发送到你的机器上,如果
  48. 不成功,才会发送到备份邮件服务器上。

  49. offline=YES|NO System:DynDNS Optional: Yes
  50. 使域名暂时失效。

  51. url=dest_url System:WebHop Optional: No
  52. webhop指向的URL地址

  53. cloak=YES|NO System:WebHop Optional: Yes
  54. 指明webhop时是否使用frame,将转向的url包装起来。缺省是YES

  55. title=cloak_title System:WebHop Optional: Yes
  56. cloak时,frame的标题。缺省是 "Bentium DynDns System"

  57. ip1=address1 System:SubDom Optional: YES
  58. 第一个域名服务器的IP地址,必须是正确的IP。如果不指定,则服务器将选择最佳的IP
  59. (一些Proxy会传递客户端的IP, 这会被服务器检测到)。如果传递的地址格式错误,
  60. 则忽略这个参数,而用服务器检测到的IP。

  61. ip2=address2 System:SubDom Optional: YES
  62. 第二个域名服务器的IP地址,必须是正确的IP
复制代码


希网动态域更新返回码
http://www.3322.org/dyndnspage/codes.html


希网动态域名——返回码解释

  1. Pre-Update Errors
  2. badauth Bad authorization (username or password)
  3. badsys The system parameter given was not valid.
  4. badagent The useragent your client sent has been blocked at the access
  5. level. Support of this return code is optional.

  6. Update Complete
  7. good Update good and successful, IP updated
  8. nochg No changes, update considered abusive

  9. good或noschg后面会跟着所更新的IP地址

  10. Input Error Conditions
  11. notfqdn A Fully-Qualified Domain Name was not provided
  12. nohost The hostname specified does not exist
  13. nourl WebHop时,没有设置URL
  14. !donator The offline setting was set, when the user is not a donator,
  15. this is only returned once
  16. !yours The hostname specified exists, but not under the username
  17. currently being used
  18. !active The hostname specified is in a Custom DNS domain which has not
  19. yet been activated
  20. abuse The hostname specified is blocked for abuse; contact support to
  21. be unblocked

  22. Server Error Conditions
  23. numhost Too many or too few hosts found
  24. dnserr DNS error encountered

  25. Wait Conditions
  26. wxxh Wait "xx" hours
  27. wxxm Wait "xx" minutes
  28. wxxs Wait "xx" seconds

  29. Emergency Conditions
  30. 911 Shutdown until notified otherwise via status.shtm
复制代码

论坛徽章:
0
4 [报告]
发表于 2004-06-06 23:14 |只看该作者

说说3322动态域名在使用中遇到的一些问题(感谢hefish)

厉害,不过很晕!

论坛徽章:
0
5 [报告]
发表于 2004-06-07 07:36 |只看该作者

说说3322动态域名在使用中遇到的一些问题(感谢hefish)

我一直用这种方式,没收到过来信:

/usr/local/bin/ez-ipupdate -i ppp0 -h nero.3322.org -S qdns -u llzqq:password


如果用这种方式就会有报错信息:

/usr/local/bin/ez-ipupdate -c /usr/local/bin/qdns.conf

论坛徽章:
0
6 [报告]
发表于 2004-06-07 07:47 |只看该作者

说说3322动态域名在使用中遇到的一些问题(感谢hefish)

对,我用的第二种方式

不过现在不会报错了:)

论坛徽章:
0
7 [报告]
发表于 2004-06-07 10:36 |只看该作者

说说3322动态域名在使用中遇到的一些问题(感谢hefish)

我的客户端是自己写的,用perl。。。。哈哈。。。

论坛徽章:
0
8 [报告]
发表于 2004-06-07 11:22 |只看该作者

说说3322动态域名在使用中遇到的一些问题(感谢hefish)

牛啊!

贴出来一起分享一下如何?

论坛徽章:
0
9 [报告]
发表于 2004-06-07 14:02 |只看该作者

说说3322动态域名在使用中遇到的一些问题(感谢hefish)

小彭客户端向来写的比较差。。。
我贪方便,也自己写了一个简单的。。。没有出错处理。。。。


  1. hefish@lylib:~$ cat 3322.pl
  2. #!/usr/bin/perl

  3. require LWP::UserAgent;

  4. $user="username";
  5. $pass="password";
  6. $domain="domain.3322.org";


  7. $url = "http://".$user.":".$pass."\@members.3322.org/dyndns/update?system=dyndns&hostname=".$domain."&wildcard=OFF";

  8. my $ua = LWP::UserAgent->;new;
  9. $ua->;timeout(10);
  10. $ua->;env_proxy;

  11. my $response = $ua->;get($url);

  12. if ($response->;is_success) {
  13.     print $response->;content;  # or whatever
  14. }
  15. else {
  16.     die $response->;status_line;
  17. }
复制代码


修改username, password, domain三个参数就可以用了。

论坛徽章:
0
10 [报告]
发表于 2004-06-07 14:25 |只看该作者

说说3322动态域名在使用中遇到的一些问题(感谢hefish)

看来写这个的人也是非常了解3322的机制啊

如此说来,其实用BROWSER直接写一个(或几个)URL也可以咯
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP