linux ddns client ddclient

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

以后开机会自动更新


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值