linux下利用ddclient免費為頂級網域名稱綁定動態IP(非cname法)

來源:互聯網
上載者:User

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,同時這對adsl router使用者來說更好的一點就是,每隔一段時間程式就串連一次[url]www.ip138.com[/url],保證adsl串連不斷開(因為adsl router一段時間沒有流量會自動掛斷串連)。唯一的缺點,如果[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

以後開機會自動更新

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.