refresh-dns-with-google-domains
v0.0.14
Published
Simple polling to check external ip address if it's mapped in a Dynamic DNS in Google Domains. It needs a Google Domains account with at least one domain active.
Downloads
97
Readme
Fast, light, minimalist DNS polling refresh for Google Domains Dynamic DNS Node.js.
require('refresh-dns-with-google-domains').refresh();
Installation
This is a Node.js module available through the npm registry.
Before installing, download and install Node.js. Node.js 0.10 or higher is required.
If this is a brand new project, make sure to create a package.json
first with
the npm init
command.
Installation is done using the
npm install
command:
$ npm install refresh-dns-with-google-domains
Config file
Create a file named ext-ip.config
in your HOME directory.
$ nano /home/USERNAME/ddns/host1/ext-ip.config
$ nano /home/USERNAME/ddns/host2/ext-ip.config
$ nano /home/USERNAME/ddns/host3/ext-ip.config
$ nano /home/USERNAME/ddns/host4/ext-ip.config
Following template:
{
"dnsAddress": "your-hostname",
"username": "Google-Domains-Dynamic-DNS-username",
"password": "Google-Domains-Dynamic-DNS-password"
}
Change file with your parameters and save.
It will create a file in your home directory named `ext-ip.txt`` with your actual external IP. This is a temporary file. YOU DON'T ERASE IT.
Running Tests
To run the test suite, enter in the test
directory, then run npm run start
:
$ cd /home/USERNAME/node_modules/refresh-dns-with-google-domains/test
$ npm install
$ npm run start
If you don't have the config file, the test suite will create a template config file for you.