Python DDNS client for Aliyun(http://www.hdget.com/aliyun-ddns-client)
This version of DDNS client only supports auto updating 'A' type DomainRecord with IPV4 address.
Other types are not supported because they need following value format other than IP address:
Some 3rd party python libraries are required for aliyun-ddns-client as below, you can install it via pip or easy_install:
For example:
# pip install requests
# pip install netifaces # optional
*/5 * * * * cd /opt/aliyun-ddns-client && /usr/bin/python ddns.py
root@local# systemctl daemon-reload
root@local# systemctl start ddns.timer
root@local# systemctl status ddns.timer -l
Required options need to be set in /etc/ddns.conf:
Optional options:
[DEFAULT]
# access id obtains from aliyun
access_id=
# access key obtains from aliyun
access_key=
# it is not used at this moment, you can just ignore it
interval=600
# turn on debug mode or not
debug=true
[DomainRecord1]
# domain name, like google.com
domain=
# subdomain name, like www, blog, bbs, *, @, ...
sub_domain=
# resolve type, 'A', 'AAAA'..., currently it only supports 'A'
type=A
[feature_public_ip_from_nic]
enable=false
interface=eth0
NOTICE: Only domain records both defined in local config file and Aliyun server will be updated
Q: Why it failed with error message "The input parameter \"Timestamp\" that is mandatory for processing this request is not supplied." in describeDomainRecords()?
A: Please check what's the value in params 'TimeStamp'. If the value has big difference with the correct time, you need use ntpdate to sync system time to the correct one.
Q: Why it failed with error message "Failed to save the config value"?
A: You need make sure current cronjob user has permission to write file /etc/ddns.conf.
Q: Why it raise exception "AttributeError: 'X509' object has no attribute '_x509'"?
A: PyOpenSSL version need >= 0.14, and you may try to fix this problem by do following:
sudo yum uninstall python-requests
sudo pip uninstall pyopenssl cryptography requests
sudo pip install requests