This is a custom shell script for Asuswrt-Merlin router firmware to update DDNS via CloudFlare.
-
Add an
A record
in CloudFlare for your domain. IP for the record can be anything since the script will overwrite it later anyway. -
Download ddns-start script and modify the following variables with your own settings:
APITOKEN
is your API Token generated from the User Profile 'API Tokens' page. I recommend creating a token with minimal access to limit exposure:Permission: Zone | DNS | Edit
Zone Resources: Include | Specific Zone | <your zone>ZONEID
is your Zone ID, hex16 stringRECORDNAME
is your DNS record name, e.g. sub.example.comRECORDTTL
is the TTL for the record in seconds, defaults to auto -
SSH to your router and place
ddns-start
under/jffs/scripts/
-
Make sure it's executable
chmod +x /jffs/scripts/ddns-start
-
Log into the router web UI
- Go to
Advanced Settings
>WAN
>DDNS
- Set
Server
toCustom
- Click the
Apply
button
- Go to