Alibaba Cloud DNS (AliDNS) is an authoritative DNS resolution service provided by Alibaba Cloud, supporting dynamic creation and updating of DNS records. This DDNS project uses AccessKey ID and AccessKey Secret for API authentication.
Official Links:
Use Alibaba Cloud AccessKey ID and AccessKey Secret for authentication.
AliyunDNSFullAccess
permission{
"dns": "alidns",
"id": "your_access_key_id", // AccessKey ID
"token": "your_access_key_secret" // AccessKey Secret
}
Ensure the Alibaba Cloud account has the following permissions:
You can view and configure permissions in the RAM Console.
{
"$schema": "https://ddns.newfuture.cc/schema/v4.0.json", // Format validation
"dns": "alidns", // Current provider
"id": "your_access_key_id", // AccessKey ID
"token": "your_access_key_secret", // AccessKey Secret
"index4": ["url:http://api.ipify.cn", "public"], // IPv4 address source
"index6": "public", // IPv6 address source
"ipv4": ["ddns.newfuture.cc"], // IPv4 domains
"ipv6": ["ddns.newfuture.cc", "ipv6.ddns.newfuture.cc"], // IPv6 domains
"endpoint": "https://alidns.aliyuncs.com", // API endpoint
"line": "default", // Resolution line
"ttl": 600 // DNS record TTL (seconds)
}
Parameter | Description | Type | Range/Options | Default | Parameter Type |
---|---|---|---|---|---|
dns | Provider identifier | String | alidns |
None | Provider Parameter |
id | Authentication ID | String | Alibaba Cloud AccessKey ID | None | Provider Parameter |
token | Authentication key | String | Alibaba Cloud AccessKey Secret | None | Provider Parameter |
index4 | IPv4 source | Array | Reference | default |
Common Config |
index6 | IPv6 source | Array | Reference | default |
Common Config |
ipv4 | IPv4 domains | Array | Domain list | None | Common Config |
ipv6 | IPv6 domains | Array | Domain list | None | Common Config |
endpoint | API endpoint | URL | See below | https://alidns.aliyuncs.com |
Provider Parameter |
line | Resolution line | String | See below | default |
Provider Parameter |
ttl | TTL time | Integer (seconds) | See below | None | Provider Parameter |
proxy | Proxy settings | Array | Reference | None | Common Network |
ssl | SSL verification | Boolean/String | auto , true , false |
auto |
Common Network |
cache | Cache settings | Boolean/String | true , false , filepath |
true |
Common Config |
log | Log configuration | Object | Reference | None | Common Config |
Parameter Type Description:
- Common Config: Standard DNS configuration parameters applicable to all supported DNS providers
- Common Network: Network setting parameters applicable to all supported DNS providers
- Provider Parameter: Supported by current provider, values related to current provider
Note: Different packages may support different values for
ttl
andline
.
Alibaba Cloud DNS supports multiple regional endpoints, you can choose the optimal node based on region and network environment:
https://alidns.aliyuncs.com
https://alidns.cn-hangzhou.aliyuncs.com
https://alidns.cn-shanghai.aliyuncs.com
https://alidns.cn-qingdao.aliyuncs.com
https://alidns.cn-beijing.aliyuncs.com
https://alidns.cn-zhangjiakou.aliyuncs.com
https://alidns.cn-shenzhen.aliyuncs.com
https://alidns.cn-chengdu.aliyuncs.com
https://alidns.ap-southeast-1.aliyuncs.com
https://alidns.ap-southeast-2.aliyuncs.com
https://alidns.ap-southeast-3.aliyuncs.com
https://alidns.ap-south-1.aliyuncs.com
https://alidns.ap-northeast-1.aliyuncs.com
https://alidns.us-east-1.aliyuncs.com
https://alidns.us-west-1.aliyuncs.com
https://alidns.eu-central-1.aliyuncs.com
https://alidns.eu-west-1.aliyuncs.com
Note: It is recommended to use the default endpoint
https://alidns.aliyuncs.com
, Alibaba Cloud will automatically route to the optimal node. Only specify specific regional endpoints in special network environments.
The ttl
parameter specifies the Time To Live (TTL) for DNS records in seconds. Alibaba Cloud supports TTL ranges from 1 to 86400 seconds (1 day). If not set, the default value is used.
Package Type | Supported TTL Range (seconds) |
---|---|
Free | 600 - 86400 |
Personal | 600 - 86400 |
Enterprise Standard | 60 - 86400 |
Enterprise Flagship | 1 - 86400 |
Reference: Alibaba Cloud DNS Documentation
The line
parameter specifies DNS resolution lines, supported by Alibaba Cloud:
Line Identifier | Description |
---|---|
default | Default |
telecom | China Telecom |
unicom | China Unicom |
mobile | China Mobile |
edu | China Education Network |
aliyun | Alibaba Cloud |
oversea | Overseas |
internal | China Region |
More lines reference: Alibaba Cloud DNS Documentation
Enable debug logging to view detailed information:
ddns -c config.json --debug
Recommendation: Use RAM sub-accounts and regularly rotate AccessKeys to improve account security.