[Ubuntu] DDClient
- 2023.02.01
- Ubuntu 22.04
ddclient
安裝與設定
sudo apt install libio-socket-ssl-perl
sudo apt install ddclient
- Dynamic DNS service provider:
Google Domains: domains.google- Namecheap: other → namecheap →
Dynamic DNS server (blank for default)
-
Optional HTTP proxy - Username & Password:
Google Domains:前往 http://domains.google.com選擇網域選擇DNS
頁面最下方「顯示進階設定」展開「動態 DNS」點選「查看憑證」取得 Username 和 Password:
- Namecheap:
- Username: Your domain name
- Password:
Account → Domain List → MANAGE
→ Advanced DNS → DYNAMIC DNS → Status: OFF ⇒ ON
→ Dynamic DNS Password
-
IP address discovery method:
-
Web-based IP discovery service:
Google Domains:IP discovery service: dyndns http://checkip.dyndns.org/
- Namecheap: dynamicdns.park-your-domain.com/getip
-
Network Interface:
-
Network Interface: ppp0
-
How to run ddclient:
- As a daemon (定時更新 IP)
-
On PPP connect (經由 PPP 連線時更新 IP)
-
-
-
Time between address checks: IP 更新的間隔時間
-
Hosts to update (comma-separated):
-
Google Domains: a1go.net - Namecheap:
- Hosts to update 設為 @
- Create the A + Dynamic DNS Record:
- Log into the Namecheap account
→ Domain List → Find the domain name and click on the MANAGE button next to it - Navigate to the Advanced DNS tab at the top of the page
→ Scroll down to the HOST RECORDS section - 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
- Click on the SAVE ALL CHANGES button to save your changes.
- Log into the Namecheap account
-
重新啟動「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