CentOS 7.x godaddy-dns based dynamic DNS updates
From Notes_Wiki
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:
- Create API key and secret through web browser
- Login to godaddy developer site using your godaddy credentials https://developer.godaddy.com/keys/
- Click on "API Keys"
- Select "Create New API Key in top right side"
- Enter Keyname "test-Rnd"
- Choose environment "Production"
- Click Next
- Save API key and secret. (It doesn't show secret again)
- Install node.js
- curl -sL https://rpm.nodesource.com/setup_8.x | sudo bash -
- yum install -y nodejs
- Check node.js version
- node --version
- npm --version
- Install godaddy-dns using NPM
- npm install --global godaddy-dns
- Check whether installation is successful
- godaddy-dns -V
- 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
- 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:
- https://linuxize.com/post/how-to-install-node-js-on-centos-7/
- https://www.npmjs.com/package/godaddy-dns
- https://github.com/lmammino/godaddy-dns/blob/HEAD/config.json.sample
Steps contributed by Pavan Ponamala
Home > CentOS > CentOS 7.x > Command line tools and utilities > CentOS 7.x godaddy-dns based dynamic DNS updates