因为使用的是动态 IP,远程访问比较麻烦,所以一般会申请一个 3322 的动态域名,然后通过更新域名对应的 IP 来实现域名访问远程主机的目的。

在 linux 下,3322 的网站提供了用 lynx 来更新 IP 的命令。但是不知从何时开始,这命令已经不好使了。输出的错误如下:

  1. $lynx -mime_header -auth=xxxx : xxxx "http://www.3322.org/dyndns/update?system=dyndns&hostname=xxxx.3322.org"
  2. Can't Access `file://localhost/home/xxxx/:'
  3. Alert!: Unable to access document.
  4. lynx: Can't access startfile
  5. Can't Access `file://localhost/home/xxxx/:'
  6. Alert!: Unable to access document.
  7. Can't Access `file://localhost/home/xxxx/xxxx'
  8. Alert!: Unable to access document.
  9. lynx: Can't access startfile
  10. lynx: Username and Password required!!!
  11. Can't Access `file://localhost/home/xxxx/:'
  12. Alert!: Unable to access document.
  13. Can't Access `file://localhost/home/xxxx/xxxx'
  14. Alert!: Unable to access document.
  15. Looking up www.3322.org
  16. Making HTTP connection to www.3322.org
  17. Sending HTTP request.
  18. HTTP request sent; waiting for response.
  19. Alert!: Access without authorization denied -- retrying
  20. Retrying with access authorization information.
  21. Looking up www.3322.org
  22. Making HTTP connection to www.3322.org
  23. Sending HTTP request.
  24. HTTP request sent; waiting for response.
  25. Alert!: Can't retry with authorization!  Contact the server's WebMaster.
  26. Can't Access `http://www.3322.org/dyndns/update?system=dyndns&hostname=xxxx.3322.org'
  27. Alert!: Unable to access document.
  28. lynx: Can't access startfile

后发现原因: 用 户名和密码之间的空格是不需要的,被误导了,唉。。。

修正后,结果正常。

  1. HTTP/1.1 200 OK
  2. Server: nginx
  3. Date: Sat, 13 Dec 2008 11:29:48 GMT
  4. Content-Type: text/plain; charset=GBK
  5. Connection: close
  6. good xxx.xxx.xx.xx

不过,还是看看 3322 提供的 linux 版客户端吧。

先看 binary 版本: http://www.3322.org/download/ez-ipupdate-3.0.10-linux-i386.tgz

  1. $ ./ez-ipupdate
  2. ./ez-ipupdate: relocation error: ./ez-ipupdate: symbol errno, version
  3. GLIBC_2.0 not defined in file libc.so.6 with link time reference

看看 libc.so.6 的版本:

  1. $ /lib/libc.so.6
  2. GNU C Library stable release version 2.7, by Roland McGrath et al.
  3. Copyright (C) 2007 Free Software Foundation, Inc.
  4. This is free software; see the source for copying conditions.
  5. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
  6. PARTICULAR PURPOSE.
  7. Compiled by GNU CC version 4.2.4 (Ubuntu 4.2.4-1ubuntu1).
  8. Compiled on a Linux >>2.6.24-16-server<< system on 2008-09-12.
  9. Available extensions:
  10. crypt add-on version 2.1 by Michael Glad and others
  11. GNU Libidn by Simon Josefsson
  12. Native POSIX Threads Library by Ulrich Drepper et al
  13. BIND-8.2.3-T5B
  14. For bug reporting instructions, please see:
  15. <http://www.gnu.org/software/libc/bugs.html>.

没法用了,用源码编译吧。

源码版本:http://www.3322.org/download/ez-ipupdate-3.0.10.tgz

make 的时候出错:

  1. gcc  -g -O2  -o ez-ipupdate  ez-ipupdate.o conf_file.o md5.o cache_file.o pid_file.o
  2. /usr/bin/ld: errno: TLS definition in /lib/libc.so.6 section .tbss mismatches non-TLS reference in conf_file.o
  3. /lib/libc.so.6: could not read symbols: Bad value
  4. collect2: ld returned 1 exit status
  5. make: *** [ez-ipupdate] Error 1

主要是 extern int errno; 惹的祸,patch 之。

  1. diff -uNr ez-ipupdate-3.0.10/conf_file.c ez-ipupdate-3.0.10_diff/conf_file.c
  2. --- ez-ipupdate-3.0.10/conf_file.c  2000-10-23 10:36:18.000000000 +0800
  3. +++ ez-ipupdate-3.0.10_diff/conf_file.c 2008-12-12 23:32:53.000000000 +0800
  4. @@ -36,13 +36,14 @@
  5. #include <string.h>
  6. #include <conf_file.h>
  7. +#include <errno.h>
  8. #if HAVE_STRERROR
  9. -extern int errno;
  10. +//extern int errno;
  11. #  define error_string strerror(errno)
  12. #elif HAVE_SYS_ERRLIST
  13. extern const char *const sys_errlist[];
  14. -extern int errno;
  15. +//extern int errno;
  16. #  define error_string (sys_errlist[errno])
  17. #else
  18. #  define error_string "error message not found"
  19. diff -uNr ez-ipupdate-3.0.10/error.h ez-ipupdate-3.0.10_diff/error.h
  20. --- ez-ipupdate-3.0.10/error.h  2000-11-25 06:46:37.000000000 +0800
  21. +++ ez-ipupdate-3.0.10_diff/error.h 2008-12-12 23:31:59.000000000 +0800
  22. @@ -1,12 +1,14 @@
  23. #ifndef _ERROR_H
  24. #define _ERROR_H
  25. +#include <errno.h>
  26. +
  27. #if HAVE_STRERROR
  28. -extern int errno;
  29. +//extern int errno;
  30. #  define error_string strerror(errno)
  31. #elif HAVE_SYS_ERRLIST
  32. extern const char *const sys_errlist[];
  33. -extern int errno;
  34. +//extern int errno;
  35. #  define error_string (sys_errlist[errno])
  36. #else
  37. #  define error_string "error message not found"

现在 patch 完成,ez-ipupdate 可以工作了。

  1. $ ./ez-ipupdate -c qdns.conf
  2. ez-ipupdate Version 3.0.10
  3. Copyright (C) 1999-2000 Angus Mackay.
  4. no update needed at this time

IP 都没改变,不用更新了。

3322 动态域名更新 IP 程序补丁相关推荐

  1. Debian下安装3322动态域名更新程序

    Ez-ipupdate 是一个动态域名更新程序,可以更新希网的动态域名. 1.对于动态域名(DYNDNS),service-type参数应该选择 qdns 2.对于静态域名(STATDNS),serv ...

  2. 使用EJS脚本实现花生壳动态域名更新服务(二)

    此博客为9925.org的镜像,登录9925.org可以查看到最新博文. 原文出处:http://ily.so/AV3yQv 在<使用EJS脚本实现花生壳动态域名更新服务(一)>中,我们粗 ...

  3. 使用EJS脚本实现花生壳动态域名更新服务(一)

    此博客为9925.org的镜像,登录9925.org可以查看到最新博文. 原文出处:http://ily.so/FrQBne 花生壳提供了动态域名服务,动态域名可实现几乎实时生效的DNS解析服务,并且 ...

  4. DNS云学堂 | 替代传统Windows DNS功能,不得不说的动态域名更新

    为满足应用的双活改造和灵活切换的场景,很多企业依靠DNS系统实现应用与IP的解耦.搭建专业的DNS系统,替代传统Windows的DNS功能,成为了企业信息化发展健全的一个必要过程. 与域控结合,组建更 ...

  5. dnspod每步nat123及3322动态域名同类端口映射域名解析软件对比

    首先说明下这三个名词:端口映射.域名解析.动态域名解析. 端口映射 80端口映射或自定义端口映射.可以解决80端口被屏蔽,可以在内网使用直接发布网站应用,可以在内网使用实现外网访问内网应用. 域名解析 ...

  6. dnspod每步nat123及3322动态域名同类网络辅助软件对比

    直接正题,就使用体会对比域名解析/动态域名/动态域名解析/端口映射相关免费软件或平台. dnspod dnspod域名解析.不需要转入域名.URL隐性转发另收费. dnspod动态域名解析.不需要转入 ...

  7. 3322linux自动更新ip,ubuntu开机自动运行动态域名更新

    想在Ubuntu开机自动运行时启动动态域名的更新,于是在网上找设置的方法.开始找到了使用sysn-rc-conf命令来设置自动运行程序.原本以为用它能实现,可是运行后发现它只能对现有的启动项进行设置( ...

  8. 阿里云ddns,动态域名更新Python脚本,基于Python3,适用于linux

    阿里云ddns更新脚本,基于Python3 前提:已经在阿里云注册了一个域名,获得AccessKey ID AccessKey Secret,先添加了一个子域名解析,解析值随便 然后获取这个子域名的r ...

  9. 公云(3322)动态域名指定ip解析脚本

    适用于路由器ddns插件脚本 http://[USERNAME]:[PASSWORD]@members.3322.net/dyndns/update?system=dyndns&hostnam ...

最新文章

  1. Python中解决ModuleNotFoundError: No module named 'tensorflow._api'问题
  2. python 在互联网应用是如此强大
  3. java基础知识陷阱
  4. android studio ignore 模板,android studio git ignore
  5. MySQL-5.7.21非图形化下载、安装、连接问题记录
  6. Excel 2007 底层实现方式
  7. java经纬度度分秒转换为小数点格式
  8. 计算机excel数据标签,excel散点图数据标签,Excel如何设置散点图标签
  9. easyexcel 第一次导入导出会报错com.alibaba.excel.exception.ExcelAnalysisException,所以自定义excel导入导出表格
  10. Rstudio插入Excel数据
  11. 玩转用户身份权益——详解闲鱼身份权益体系的实现
  12. 芯片加密与解密技术方法
  13. mysql root误删_mysql 误删root
  14. 量子计算机人类意识云,我们的大脑很可能就是一台高度发达的量子计算机
  15. FFMPEG 将IPCamera的RTSP视频流传送至RED5服务器 小白教程
  16. 学术派 | 基于AI的视频精彩度分析技术
  17. 我的2013----IT女的一年经历
  18. html掷骰子游戏的代码,jquery实现掷骰子小游戏
  19. Macbook增加扩展屏待机重开后软件界面错乱问题解决方案
  20. 【教程】百度网盘小程序如何获取真实的链接和提取码

热门文章

  1. LIMS管理系统应用存在的问题有哪些?
  2. Win7硬盘安装CentOS7双系统
  3. 海康、大华网络摄像机(Ip Camera)RTSP地址和格式
  4. python代码图片头像_Flask 上传自定义头像的实例详解
  5. 计算机管理员被删除后如何恢复,事实:计算机管理员如何恢复已删除的文件,QQ计算机管理员文件的恢复方法...
  6. ‘erl‘ 不是内部或外部命令,也不是可运行的程序 或批处理文件
  7. 静态代码扫描环境搭建(mac)
  8. linux basics for hackers
  9. CSS 精灵图的使用;精灵图不见了;如果一次性设置多个精灵图
  10. 大数据调度平台之Rundeck生产实践