0.0.1 • Published 6 years ago

remote-dns-updater v0.0.1

Weekly downloads
6
License
MIT
Repository
github
Last release
6 years ago

npm GitHub release npm type definitions code style: prettier npm

Remote DNS Updater (RDNSU) is an automated Dynamic DNS updating tool conforming to the "Remote Access Update API". It's purpose is to automatically update the DNS record with the external IP of the machine that's running RDNSU.

Install

The package is a complete application and can not be used as a module. There for it needs to be installed as a global.

npm install -g remote-dns-updater

Post-Install script

During installation a post install script will be executed to create the application configuration folder, log folders and a bare minimum configuration file. Depending on how npm is installed on the system. The package might have to be installed with the --unsafe-perm argument or the script has to be run manually.

npm install -g remote-dns-updater --unsafe-perm

Usage

To start the application simply run the the binary rdnsu. This will start the application attached to the command line. It is recommended to start this way while configuring the application.

The following commands can later be use to start, stop and restart RDNSU in detached mode.

Configuration

The application can be configured through the CL or by editing the configuration file that's been created in:

  • /etc/rdnsu/ for linux like systems.

Command Line Configuration

The CL has a small range of configuration options mainly focusing on DDNS settings and Logging. The following configuration settings can be provided through the CL

  • remote_host, H - URL to the remote DNS service.
  • path, A - Optional path for the DDNS service.
  • user, u- Remote DNS user name.
  • password, p - Remote DNS service password.
  • dns_record, D - DNS record that points to the current network.
  • protocol, P - Protocol to use when updating the DNS record. http | https Default: http
  • logging_level, L - Log file Logging level. error | warn | info | verbose | debugging | silly : Default: verbose
  • update_interval, U - The interval to check for ip changes. Default: 10
  • remind, r - If the DNS Updater is suspended it will remind the user of the current suspension.
  • remind_count, R - The number of update intervals before a reminder that the updater has gone into suspension mode will be sent. Default: 15
  • save, S - Will save the current running settings.

Configuration File

The configuration file has slightly more settings that pertain to mail logging. Configuration is done in JSON is named config.json.

  • remote_host \ - URL to the remote DNS service.
  • path \ - Optional path for the DDNS service.
  • user \ - Remote DNS user name.
  • password \ - Remote DNS service password.
  • dns_record \ - DNS record that points to the current network.
  • protocol \ - Protocol to use when updating the DNS record. http | https Default: http
  • logging_level \ - Log file Logging level. error | warn | info | verbose | debugging | silly : Default: verbose
  • update_interval \ - The interval to check for ip changes. Default: 10
  • remind \ - If the DNS Updater is suspended it will remind the user of the current suspension.
  • remind_count \ - The number of update intervals before a reminder that the updater has gone into suspension mode will be sent. Default: 15
  • email \ - Providing an object with the following properties enables email logging.
    • to \ - Receiving address.
    • from \ - Sending address.
    • host \ - SMTP server hostname default: localhost
    • port \ - SMTP port default: 587 or 25
    • username \ - Username for server auth
    • password \ - Password for server auth
    • subject \ - Subject for email default: winston:{{level}}{{msg}}
    • ssl \ | \ - Use SSL. boolean or object {key, ca, cer}
    • tls \ - Use TLS. Uses starttls if true.
    • level \ - Logging level to report with mail.
    • unique \ - Isolate a single logging level to report through mail.
    • authentication \<string[]> - Preffered SMTP auth methods. defaults: ['PLAIN', 'CRAM-MD5', 'LOGIN', 'XOAUTH2']

Email logging is based on emailjs.

Configuration precedence

RDNSU will prioritize CL configuration over file configuration and will therefor overwrite any properties during runtime. Passing --save when configuring RDNSU through the CL will save the newly set configuration properties.

Suspension State

The Dynamic DNS API has several return codes with varying severity. Where abuse is seen as the worse kind. To mitigate any chances of being locked out of the DDNS service. RDNSU goes into suspension mode if anything abnormal occurs.

Depending on what kind of error code has occurred RDNSU will resume operations after some time, if possible. Otherwise user intervention is necessary and the application will stay in suspended mode until further notice. A notification will be logged (and emailed if activated) when the application goes into suspension. If the reminding configuration is on. The application will log reminders.

0.0.6

6 years ago

0.0.1

6 years ago