CentOS 7.x godaddy-dns based dynamic DNS updates

From Notes_Wiki
Revision as of 09:08, 25 August 2022 by Saurabh (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Home > CentOS > CentOS 7.x > Command line tools and utilities > CentOS 7.x godaddy-dns based dynamic DNS updates

For Dynamic DNS update for domains registered via Godaddy using godaddy-dns node js package use following steps:

  1. Create API key and secret through web browser
    1. Login to godaddy developer site using your godaddy credentials https://developer.godaddy.com/keys/
    2. Click on "API Keys"
      1. Select "Create New API Key in top right side"
      2. Enter Keyname "test-Rnd"
      3. Choose environment "Production"
      4. Click Next
      5. Save API key and secret. (It doesn't show secret again)
  2. Install node.js
    curl -sL https://rpm.nodesource.com/setup_8.x | sudo bash -
    yum install -y nodejs
  3. Check node.js version
    node --version
    npm --version
  4. Install godaddy-dns using NPM
    npm install --global godaddy-dns
  5. Check whether installation is successful
    godaddy-dns -V
  6. Create script (config.json' for updating sub-domain IP using our dynamic public ip with:
    {
    "apiKey": "<paste-api-key>",
    "secret": "<paste-api-secret>",
    "domain": "example.com",
    "records": [
    {"type": "A", "name": "mysubdomain", "ttl": 600}
    ]
    }
    Above script will update "mysubdomain.example.com" record every time new public IP is detected
  7. Run script using:
    godaddy-dns -c config.json
    You will get output like below
    Successfully updated DNS records to ip XX.XX.XX.XX

Refer:


Steps contributed by Pavan Ponamala


Home > CentOS > CentOS 7.x > Command line tools and utilities > CentOS 7.x godaddy-dns based dynamic DNS updates