Code Monkey home page Code Monkey logo

rrthomas / ddclient Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ddclient/ddclient

0.0 3.0 1.0 1.5 MB

(Friendly fork/continuation.) Ddclient is a Perl client used to update dynamic DNS entries for accounts on 'Dynamic DNS Network Services' free DNS service. It currently supports a lot of different routers and a few different services.

License: GNU General Public License v2.0

Shell 2.56% Makefile 0.45% M4 1.73% Perl 95.24% Nix 0.01%
dyndns dyndns-client dyndns-updater

ddclient's Introduction

DDCLIENT

ddclient is a Perl client used to update dynamic DNS entries for accounts on many dynamic DNS services. It uses curl for internet access.

This is a friendly fork/continuation of https://github.com/ddclient/ddclient

Alternatives

You might also want to consider using one of the following, if they support your dynamic DNS provider(s): https://github.com/troglobit/inadyn or https://github.com/lopsided98/dnsupdate.

Supported services

Dynamic DNS services currently supported include:

ddclient supports finding your IP address from many cable and DSL broadband routers.

Comments, suggestions and requests: please file an issue at https://github.com/rrthomas/ddclient/issues/new

The code was originally written by Paul Burry and is now hosted and maintained through github.com. Please check out https://ddclient.net

REQUIREMENTS

  • An account from a supported dynamic DNS service provider
  • Perl v5.10.1 or later
    • JSON::PP perl library for JSON support
  • Linux, macOS, or any other Unix-ish system
  • An implementation of make (such as GNU Make)
  • If you are installing from a clone of the Git repository, you will also need GNU Autoconf and GNU Automake.

DOWNLOAD

See https://github.com/rrthomas/ddclient/releases

INSTALLATION

Distribution Package

Packaging status The easiest way to install ddclient is to install a package offered by your operating system. See the image to the right for a list of distributions with a ddclient package.

Manual Installation

  1. Extract the distribution tarball (.tar.gz file) and cd into the directory:

    tar xvfa ddclient-3.XX.X.tar.gz
    cd ddclient-3.XX.X

    (If you are installing from a clone of the Git repository, you must run ./autogen before continuing to the next step.)

  2. Run the following commands to build and install:

    ./configure \
        --prefix=/usr \
        --sysconfdir=/etc/ddclient \
        --localstatedir=/var
    make
    make VERBOSE=1 check
    sudo make install
  3. Edit /etc/ddclient/ddclient.conf.

systemd

cp sample-etc_systemd.service /etc/systemd/system/ddclient.service

enable automatic startup when booting

systemctl enable ddclient.service

start the first time by hand

systemctl start ddclient.service

TROUBLESHOOTING

  1. enable debugging and verbose messages: $ ddclient -daemon=0 -debug -verbose -noquiet

  2. Do you need to specify a proxy? If so, just add a proxy=your.isp.proxy to the ddclient.conf file.

  3. Define the IP address of your router with fw=xxx.xxx.xxx.xxx in /etc/ddclient/ddclient.conf and then try $ ddclient -daemon=0 -query to see if the router status web page can be understood.

  4. Need support for another router/firewall? Define the router status page yourself with: fw=url-to-your-router's-status-page fw-skip=any-string-preceding-your-IP-address

    ddclient does something like this to provide builtin support for common routers. For example, the Linksys routers could have been added with:

fw=192.168.1.1/Status.htm
fw-skip=WAN.*?IP Address

OR Send me the output from: $ ddclient -geturl {fw-ip-status-url} [-login login [-password password]] and I'll add it to the next release!

ie. for my fw/router I used: $ ddclient -geturl 192.168.1.254/status.htm

  1. Some broadband routers require the use of a password when ddclient accesses its status page to determine the router's WAN IP address. If this is the case for your router, add
fw-login=your-router-login
fw-password=your-router-password

to the beginning of your ddclient.conf file. Note that some routers use either 'root' or 'admin' as their login while some others accept anything.

USING DDCLIENT WITH ppp

If you are using a ppp connection, you can easily update your DynDNS entry with each connection, with:

## configure pppd to update DynDNS with each connection
cp sample-etc_ppp_ip-up.local /etc/ppp/ip-up.local

Alternatively, you may just configure ddclient to operate as a daemon and monitor your ppp interface.

USING DDCLIENT WITH cron

If you have not configured ddclient to use daemon-mode, you'll need to configure cron to force an update once a month so that the dns entry will not become stale.

## configure cron to force an update twice a month
cp sample-etc_cron.d_ddclient /etc/cron.d/ddclient
vi /etc/cron.d/ddclient

USING DDCLIENT WITH dhcpcd

If you are using dhcpcd-1.3.17 or thereabouts, you can easily update your DynDNS entry automatically every time your lease is obtained or renewed by creating an executable file named: /etc/dhcpc/dhcpcd-{your-interface}.exe ie.: cp sample-etc_dhcpc_dhcpcd-eth0.exe /etc/dhcpc/dhcpcd-{your-interface}.exe

In my case, it is named dhcpcd-eth0.exe and contains the lines:

#!/bin/sh
PATH=/usr/bin:/root/bin:${PATH}
logger -t dhcpcd IP address changed to $1
ddclient -proxy fasthttp.sympatico.ca -wildcard -ip $1 | logger -t ddclient
exit 0

Other DHCP clients may have another method of calling out to programs for updating DNS entries.

Alternatively, you may just configure ddclient to operate as a daemon and monitor your ethernet interface.

USING DDCLIENT WITH dhclient

If you are using the ISC DHCP client (dhclient), you can update your DynDNS entry automatically every time your lease is obtained or renewed by creating an executable file named: /etc/dhclient-exit-hooks ie.: cp sample-etc_dhclient-exit-hooks /etc/dhclient-exit-hooks

Edit /etc/dhclient-exit-hooks to change any options required.

Alternatively, you may just configure ddclient to operate as a daemon and monitor your ethernet interface.

ddclient's People

Contributors

abelbeck avatar bernhardfrenking avatar cadence-github avatar dancapper avatar davesophoservices avatar dkerr64 avatar drinn avatar droe avatar fabianski7 avatar frogging101 avatar geraldhansen avatar gkranis avatar gottaloveit avatar harry-xue avatar jabaz avatar lenardhess avatar lucaschoeneberg avatar michal-josef-spacek avatar nelsonjr avatar okeeblow avatar rhansen avatar roberthawdon avatar rrthomas avatar supersandro2000 avatar tchebb avatar tduboys avatar wimpunk avatar wjzhou avatar zlaski avatar zraexy avatar

Watchers

 avatar  avatar  avatar

Forkers

tomeon

ddclient's Issues

Providers: Fix various old caching issues

Some providers have improper implementations with regards to caching. It seems that these implementations never did right in the first place.

These fixes are not required for the v3.11 release, that is handled in #10 .

Providers without proper cache parameter implementation:

  • 1984
  • Njalla
  • nsupdate

3.11 release plan

A quick backwards-compatible release with essential bug-fixes and functionality enhancements only. To-do list:

  • Fix caching problems (#3)
  • Update changelog
  • Contact downstream package maintainers? (Change of maintainers, change of curl dependency to be required, ...)
  • Merge back into the original repo
  • Set up signed tags (and commits)

Request for collaboration

The original project at https://github.com/ddclient/ddclient has been archived, so those of us offering to take it over can no longer discuss things on its issue tracker.

As mentioned in ddclient#528 (comment) I am happy to take on the project. Since upstream has now been discontinued, I will definitely maintain the project for my own use short-term. If there's sufficient interest from e.g. packagers and collaborators, I'll be happy to maintain it longer-term too.

Why use my fork? I don't have particular expertise in DNS, but I'm a long-term user of ddclient, and I have a history of taking other unmaintained projects and maintaining them for a long time, e.g.:

The previous maintainer of ddclient rightly pointed out that the code base is not in a great state, and recommended that others use a different dynamic DNS client, so why continue with ddclient?

  • Because it's familiar
  • Because it supports a huge range of dynamic DNS providers.

Others have suggested rewriting ddclient in a more modern language than Perl. I sympathise with this aim; indeed, I have rewritten other projects that I have taken on, but I don't think it's a great idea for ddclient; at least, I don't have the time. Instead, if I find there is interest in my fork, I plan to make some radical simplifications to make ddclient more maintainable long-term:

  • Remove support for finding IP address via many different routers. Quite simply, because I have never needed this myself.
  • Remove duplicate support for internet communication: use curl, rather than WWW::Curl::Easy or the non-Curl code.
  • Remove out-of-date/duplicate providers.

In general, I will concentrate on the core functionality of updating dynamic DNS entries, and tend to remove everything else, while retaining backwards compatibility on the command-line and in config files. In short, I will try to keep things working as well as I can for existing users.

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.