当前位置: 首页 > 工具软件 > ddclient > 使用案例 >

linux ddns client ddclient

燕正卿
2023-12-01
1. Register free domain on www.dyndns.com

2. download clients
wget http://cdn.dyndns.com/ddclient.tar.gz

3. install and config

INSTALLATION:

  cp ddclient /usr/sbin/
  mkdir /etc/ddclient
  cp sample-etc_ddclient.conf /etc/ddclient/ddclient.conf
  vi /etc/ddclient/ddclient.conf
  -- and change hostnames, logins, and passwords appropriately

  ## For those using Redhat style rc files and using daemon-mode:
  cp sample-etc_rc.d_init.d_ddclient /etc/rc.d/init.d/ddclient
  ## enable automatic startup when booting
  /sbin/chkconfig --add ddclient
  ## start the first time by hand
  /etc/rc.d/init.d/ddclient start

  ## If you are not using daemon-mode, configure cron and dhcp or ppp
  ## as described below.


simple config file:
# Basic configuration file for ddclient
#
# /etc/ddclient.conf
daemon=60
cache=/tmp/ddclient.cache
pid=/var/run/ddclient.pid
use=linksys, fw=linksys, fw-login=admin, fw-password=admin
login=your-username
password=your-password
protocol=dyndns2
server=members.dyndns.org
custom=yes, example.com
4. startup ddclient

eg. /usr/sbin/ddclient -daemon 300


inux下利用ddclient免费为顶级域名绑定动态IP(非cname法)

1.首先下载ddclient
   [url]https://www.dyndns.com/download/clients/unix/ddclient.tar.gz[/url]
2.解压ddclient.tar.gz
3.将ddclient文件拷贝到/usr/sbin/
    #cp ddclient /usr/sbin/
4.创建 /etc/ddclient 目录
     #mkdir /etc/ddclient
5.拷贝sample-etc_ddclient.conf文件到 /etc/ddclient/并重命名为ddclient.conf
    #cp sample-etc_ddclient.conf /etc/ddclient/ddclient.conf
6.编辑ddclient.conf(最重要的一步)
  dyndns主要支持  DynDNS.org  hn.org   Zoneedit.com   easydns.com  dnspark.com  OrgDNS.org dslreports. com namecheap.com ,其中zoneedit可绑定顶级域名且是免费的。(还有几个是免费的,我没有试验,至于zoneedit的用法请自己搜索)所以要修改

  #use=web, web=checkip.dyndns.org/, web-skip='IP Address' # found after IP Address

  # server=www.zoneedit.com,                 \
  # protocol=zoneedit1,                        \
  # login=your-zoneedit-login,                  \
  # password=your-zoneedit-password        \
  # your.any.domain,your-2nd.any.dom


  #use=web, web=checkip.dyndns.org/, web-skip='IP Address' # found after IP Address
    use=web, web=www.ip138.com/, web-skip='您的IP地址是:' # found after IP Address

   server=www.zoneedit.com,                 \
   protocol=zoneedit1,                        \
   login=你在zoneedit的用户名   ,                  \
   password=密码        \
   your.any.domain,your-2nd.any.dom (要更新的域名)
 
  我觉得用 use=web,这个最简单方便,不管是外网还是内网,获得的ip都是公网ip,同时这对adslrouter用户来说更好的一点就是,每隔一段时间程序就连接一次[url]www.ip138.com[/url],保证adsl连接不断开(因为adslrouter一段时间没有流量会自动挂断连接)。唯一的缺点,如果[url]www.ip138.com[/url]挂了,你的站点也要挂,哈哈,不过就本人使用ip138.com还没发现它挂过。还有几种获得ip的方法,像获取网卡地址,获取防火墙地址,获取router地址,大家可以自己试验下。


7.拷贝sample-etc_rc.d_init.d_ddclient 文件到 /etc/rc.d/并重命名为ddclient
    #cp sample-etc_rc.d_init.d_ddclient /etc/rc.d/init.d/ddclient
8.编辑/etc/rc.d/rc.local ,加入如下一行:
    /etc/rc.d/init.d/ddclient start
9.手动更新一次
   #/etc/rc.d/init.d/ddclient start

以后开机会自动更新


 类似资料:

相关阅读

相关文章

相关问答