This script support one domain / subdomain and IPv4, IPv6.
The script automatically create DNS record in zone if not exist.
- Login Cloudflare
- Create or Use API Token: https://dash.cloudflare.com/profile/api-tokens with following permissions
- Zone > DNS > Edit
- Zone > Zone > Read
- Zone > Zone Settings > Read
-
Activate SSH access on your DSM
Navigate to Control Panel > Terminal & SNMP > Enable SSH service
-
Connect via SSH
-
Run this script:
sudo wget https://raw.githubusercontent.com/JohnTheBoss/cloudflare_ddns_synology/master/cloudflare.php -O /usr/syno/bin/ddns/cloudflare.php && sudo chmod 755 /usr/syno/bin/ddns/cloudflare.php
- Add to DDNS Provider list:
sudo cp /etc.defaults/ddns_provider.conf /etc.defaults/ddns_provider.conf.orign ## Backup the original version
sudo tee -a /etc.defaults/ddns_provider.conf > /dev/null << END
[Cloudflare]
modulepath=/usr/syno/bin/ddns/cloudflare.php
queryurl=https://www.cloudflare.com/
END
-
Setup your DDNS settings:
- Navigate to Control Panel > External Access > DDNS
- Add new DDNS
- Service provider: Cloudflare
- Hostname: yourDomain.ltd
- Username: Cloudflare email address
- Password: Your created API Token
- Save
-
DISABLE SSH Access (Navigate to Control Panel > Terminal & SNMP > Enable SSH service)