What's new

name.com DDNS update script

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Mikeyy

Regular Contributor
Hello all,

name.com isn't listed in Asus Merlin custom DDNS scripts, but it's DNS update API could be used to easily update your subdomain A RECORD.

Here is short tutorial if you use name.com and want to have working DDNS on your domain without any custom DDNS providers.

1. Create DNS A record for subdomain. Our example will be merlin.example.com where "merlin" is host and "example.com" is domain.
2. Go to https://www.name.com/account/settings/api and create new token. Remember your USERNAME and TOKEN.
3. In linux terminal enter this command, but replace USERNAME, TOKEN and example.com with valid entries:
Code:
curl -u 'USERNAME:TOKEN' 'https://api.name.com/v4/domains/example.com/records'
4. You will get all your DNS records in JSON format. What you need is ID number next to your A record for "merlin.example.com".
5. When you find your ID we are ready for Merlin script! This is script:
Code:
#!/bin/sh

curl -s -u 'USERNAME:TOKEN' 'https://api.name.com/v4/domains/example.com/records/IDNUMBER' -X PUT -H 'Content-Type: application/json' --data '{"host":"merlin","type":"A","answer":"'"$1"'","ttl":300}' >/dev/null 2>&1
if [ $? -eq 0 ];
then
    /sbin/ddns_custom_updated 1
else
    /sbin/ddns_custom_updated 0
fi

In this script you need to change:
USERNAME = your API username on name.com
TOKEN = your API token on name.com
example.com = replace with your domain
IDNUMBER = replace with DNS record ID number your found in step 3.
merlin = replace with your subdomain in DNS record in step 3.

This script will update your A record for imaginary "merlin.example.com" subdomain hosted on name.com nameservers.

I could make this script easier with variables, but this is enough for start. Only issue here for people without linux is step 3.

EDIT: Non issue. If you are not using Linux desktop, you can just SSH into router (with Putty or something else) and run command from there to see result.

These are docs for API of name.com
 
Last edited:

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top