[Ubuntu] DDClient

ddclient

安裝與設定

  1. sudo apt install libio-socket-ssl-perl
  2. sudo apt install ddclient
  3. Dynamic DNS service provider:
    1. Google Domains: domains.google
    2. Namecheap: other → namecheap → Dynamic DNS server (blank for default)
  4. Optional HTTP proxy

  5. Username & Password:
    1. Google Domains:
      1. 前往 http://domains.google.com 
      2. 選擇網域
      3. 選擇DNS
      4. 頁面最下方「顯示進階設定」
      5. 展開「動態 DNS」
      6. 點選「查看憑證」取得 Username 和 Password:
    2. Namecheap:
      1. Username: Your domain name
      2. Password: 
         Account → Domain List → MANAGE
         → Advanced DNS → DYNAMIC DNS → Status: OFF ⇒ ON
         → Dynamic DNS Password 
  6. IP address discovery method: 

    1. Web-based IP discovery service:

      1. Google Domains: 
        IP discovery service: dyndns http://checkip.dyndns.org/
      2. Namecheap: dynamicdns.park-your-domain.com/getip
    2. Network Interface:

      1. Network Interface: ppp0

      2. How to run ddclient:

        1. As a daemon (定時更新 IP)
        2. On PPP connect (經由 PPP 連線時更新 IP)

  7. Time between address checks: IP 更新的間隔時間

  8. Hosts to update (comma-separated):

    1. Google Domains: a1go.net

    2. Namecheap:
      1. Hosts to update 設為 @
      2. Create the A + Dynamic DNS Record:
        1. Log into the Namecheap account
          Domain List → Find the domain name and click on the MANAGE button next to it
        2. Navigate to the Advanced DNS tab at the top of the page
          → Scroll down to the HOST RECORDS section
        3. Click on the ADD NEW RECORD button and create the following host record(s):

          Type: A + Dynamic DNS record | Host: @ | Value: 127.0.0.1 (It will be then updated automatically) | TTL: Automatic

        4. Click on the SAVE ALL CHANGES button to save your changes.

重新啟動「GUI 設定導覽」

sudo dpkg-reconfigure ddclient

測試

sudo ddclient -daemon=0 -debug -verbose -noquiet

成功會顯示:SUCCESS:  a1go.net: skipped: IP address was already set to XXX.XXX.XXX.XXX.

/etc/ddclient.conf

Google Domains Example

protocol=googledomains \
use=web, web=dyndns \
login=**************** \
password='****************' \
a1go.net

Namecheap Example

protocol=namecheap \
use=if, if=ppp0 \
login=**************** \
password='****************' \
@[, www][, ...]

 

Last Updated on 2025/04/18 by A1go

目錄
Bitnami