a29888778/ndyndns
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
ndyndns, Copyright (c) 2005-2013 Nicholas J. Kain < njkain <at> gmail <dot> com > Licensed under 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: http://ndyndns.googlecode.com 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 -n mode 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 [dyndns] username = test password = test hostname = test.dyndns.org, test.ath.cx, test.dnsalias.net, test.dnsalias.org wildcard [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 -n -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.dyndns.org. Note that -r should only be used if necessary: as is required by dyndns.org policies, checkip.dyndns.org 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.dyndns.org 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. CONTACT ======= ndyndns is completely compliant with dyndns.org's protocol specs and client recommendations, at least as far as I can tell. Namecheap and he.net have less detailed developer documentation, but I have attempted to handle them using similar principles. If you find any problems, please don't hesitate to contact me. Email is best for a prompt response, but I also check the issue tracker on googlecode from time to time.
About
Automatically exported from code.google.com/p/ndyndns
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published