Coder Social home page Coder Social logo

ndyndns's Introduction

ndyndns - dynamic dns update daemon
(C) 2005-2015 Nicholas J. Kain.  Licensed under 2-clause BSD.

REQUIREMENTS
============

Linux-based system (2.6.x/3.x/glibc 2.x tested)
BSD-based system (OpenBSD 3.8 tested)
MacOS (10.5 tested)

gcc (3.3.5+ tested), curl+libcurl (7.14.0+ tested)

Note that it is quite possible to add support for unsupported systems.  Please
refer to bsd.c or linux.c and duplicate the platform-specific functions defined
there for your operating system.

It will also be necessary to update the configure system to reflect the
requirements for your libc to resolve dns names.

DOWNLOADING
===========

If you need to update ndyndns, the latest version can be found at:

https://github.com/niklata/ndyndns/tree/master


INSTALLING
==========

It is much easier to install ndyndns from a distro-provided package, since
they will almost certainly set up a correct chroot enviromnent for you.  The
following instructions are for performing a generic install that is relatively
distro-agnostic.  Using vendor packages is highly reccomended if they are
available, since it will spare you the pain of setting up a working chroot.

If you have problems, I suggest running ndyndns in the foreground so that you
can see errors printed at the command prompt.  It will make debugging your
chroot and configuration much easier.

Building:
--------

./configure
make
make install
groupadd -g dyndns
useradd -g dyndns dyndns
mkdir /var/lib/ndyndns
chown dyndns.dyndns /var/lib/ndyndns
vim /etc/ndyndns.conf

-----------------
example config
-----------------

[config]
chroot = /var/lib/ndyndns
user = dyndns
group = dyndns
interface = eth0

[namecheap]
password = 390842ab834343
hosts = testhost2.test

[he]
userid = 30943842094820948092384
passhash = 934830984028420894201
tunnelids = 943943

-----------------


Constructing the chroot:
-----------------------

The following files and devices should be created in your chroot directory
(by default, /var/lib/ndyndns).  Either copies or hardlinks will work fine;
avoid softlinks, since they won't resolve from within the chroot.

.:
dev  etc  var

./dev:
null  random  urandom

./etc:
hosts  nsswitch.conf  resolv.conf

./var:

If you are using default paths (/var/lib/ndyndns) and user/group
(dyndns/dyndns), then the following commands will set up correct permissions.

find /var/lib/ndyndns -exec chmod 644 {} \;
find /var/lib/ndyndns -type d -exec chmod 755 {} \;
find /var/lib/ndyndns -exec chown root.root {} \;
chown dyndns.dyndns /var/lib/ndyndns/var
chmod 700 /var/lib/ndyndns/var

Then all that remains is to invoke ndyndns.  Make certain to replace "eth0"
with the name of the network interface associated with the IP that you wish
to be updated to your dyndns records (eg, for a PPPoE interface on Linux,
it is probably correct to replace eth0 with ppp0).

ndyndns -f /etc/ndyndns.conf

ADDITIONAL NOTES
================

If the system running ndyndns is not your border device (eg, it is behind a
router or firewall, and its IP address is not internet-routable), you should
add the -r switch to ndyndns.  The -r switch will instruct ndyndns to use
the IP returned by checkip.dns.he.net.  Note that -r should only be used
if necessary: checkip.dns.he.net will not be queried more than once every ten
minutes.

If chroot is not an option for your system, then you may use the -x or
--disable-chroot switch to skip the actual call to chroot().  Note
that you must still construct the environment that would be used for a
chroot as described above (although the etc and dev trees may be
omitted): it is the location where your state files will be stored.
The -c (--chroot) path will indicate the location of these files as
usual and must be specified.  Running without chroot() is not
recommended unless your environment cannot support it.

TROUBLESHOOTING
===============

Note that for certain classes of error, ndyndns will refuse to update a
given hostname.  This condition will only affect one hostname if multiple
hosts are present.  The error can be found by looking at
<CHROOTDIR>/<HOST>-dnserr.  Once the problem has been corrected, it is
only necessary to remove the corresponding <CHROOTDIR>/<HOST>-dnserr file
to resume updates.

ndyndns atomically keeps state information in the <CHROOTDIR>.  If it
becomes outdated, corrupt, or whatever, just delete the files there.  However,
it's not a good idea to unnecessarily remove these files, since they are
what allow ndyndns to avoid frivolous updates between restarts and reboots.

If the system running ndyndns does not have a network interface that has your
external IP address (ie, the one you wish your dyndns records to contain), then
try running ndyndns with the --remote (-r) switch.  It will query
checkip.dns.he.net for your external IP address rather than polling the IP
address of your network interface.

THANKS
======

Matthew Horsfall for very patiently reviewing the program and reporting
a great many robustness and build fixes, particularly on BSD.

Junji Takagi for providing some necessary fixes for BSD platforms, as
well as some documentation and consistency fixes.

Taylor R. Campbell for spotting a bug in the signal handling code, and
suggesting the implementation of a facility to read configuration files
from standard input.

Seth Fulton for spotting a bug in subdomain updates for Namecheap ddns.

ndyndns's People

Contributors

niklata avatar

Watchers

Steven Allen avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.