Skip to content

Name.com API Client to set IP on hostname when you run on dynamic IP

License

Notifications You must be signed in to change notification settings

skitsanos/dynname

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dynname

Name.com API Client to set IP on hostname when you run on dynamic IP

To run this service, you need to have node.js installed and working account on name.com

Steps to make it working

Download dynname app

git clone https://github.com/skitsanos/dynname.git

Now, let's get inside of it and setup things

cd dynname

Add execution rights to a server.js script

chmod +x server.js

Install app dependencies

npm install

It will install commander and request packages

Link it

npm link

Verify if runs properly

dynname --help

It should print you out something like this:

dynname, v.1.0.1 (Dynamic DNS client for name.com)
Usage: dynname -hostname

Options:
  -v, --version              output the version number
  -host, --hostname <hostname>  hostname
  -h, --help                 output usage information

Configure dynname client

There is a +config.json_ file with the following content:

{
  "username": "YOUR NAME.COM USERNAME",
  "token": "NAME.COM TOKEN",
  "domain": "DOMAIN NAME TO BE USED"
}

Besides name.com username you need to have also API token, which you can get for free from here: https://www.name.com/api_about. And, of course, you need to have at least one domain registered, so you can setup hostname on it.

Once you have your config.json ready, you can run from comand line a command like this:

dynname -host foo

It will create a foo.yourdomainname record in DNS settings of yourdomainname.

Now you can setup a cron job or Windows Scheduled Task to execute this script, let's say, every hour, to make sure your DNS is always updated so you can access your location by hostname, instead that dynamic IP that you always have to hunt down because your ISP is changing it all the time.

About

Name.com API Client to set IP on hostname when you run on dynamic IP

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •