Difference between revisions of "Dyndns"

From Linuxintro
imported>ThorstenStaerk
imported>ThorstenStaerk
Line 21: Line 21:
  
 
Now edit the crontab to contain a call to dyndns and restart cron.
 
Now edit the crontab to contain a call to dyndns and restart cron.
 +
<pre>
 +
SHELL=/bin/sh
 +
PATH=/usr/bin:/usr/sbin:/sbin:/bin:/usr/lib/news/bin
 +
MAILTO=root
 +
#
 +
# check scripts in cron.hourly, cron.daily, cron.weekly, and cron.monthly
 +
#
 +
-*/15 * * * *  root  test -x /usr/lib/cron/run-crons && /usr/lib/cron/run-crons >/dev/null 2>&1
 +
5    * * * *  root  /root/ddclient/ddclient
 +
</pre>
  
 
= Screenlog =
 
= Screenlog =

Revision as of 23:12, 13 May 2011

dyndns is a service that allows you to access your computer under a static name. For example your home computer could have the address mycomputer.dyndns.org. Even if your home computer's IP changed, you would still be able to access it via the public internet. To get this, you will need

This article describes how you get a daemon running on your computer. It is written to fit SUSE Linux 11.4, but other distributions should work same or similar. Download ddclient like this:

yast -i subversion
svn co https://ddclient.svn.sourceforge.net/svnroot/ddclient/trunk ddclient

Create a folder for ddclient to cache data:

mkdir /var/cache/ddclient

Create a folder for ddclient's configuration

mkdir /etc/ddclient

Configure it by editing /etc/ddclient/ddclient.conf:

protocol=dyndns2
use=web
login=yourusername
password=yourpassword
yourhostname.dyndns.org

Now edit the crontab to contain a call to dyndns and restart cron.

SHELL=/bin/sh
PATH=/usr/bin:/usr/sbin:/sbin:/bin:/usr/lib/news/bin
MAILTO=root
#
# check scripts in cron.hourly, cron.daily, cron.weekly, and cron.monthly
#
-*/15 * * * *   root  test -x /usr/lib/cron/run-crons && /usr/lib/cron/run-crons >/dev/null 2>&1
5     * * * *   root  /root/ddclient/ddclient

Screenlog

tweedleburg:~/svn/ddclient # killall ddclient
tweedleburg:~/svn/ddclient # ./ddclient
WARNING:  file /etc/ddclient/ddclient.conf: file /etc/ddclient/ddclient.conf must be accessible only by its owner (fixed).
WARNING:  file /var/cache/ddclient/ddclient.cache, line 1: program version mismatch; ignoring /var/cache/ddclient/ddclient.cache
SUCCESS:  updating staerk.dyndns.org: good: IP address set to 84.168.89.154
tweedleburg:~/svn/ddclient # ./ddclient
tweedleburg:~/svn/ddclient # rm /var/cache/ddclient/ddclient.cache
tweedleburg:~/svn/ddclient # ./ddclient
WARNING:  updating staerk.dyndns.org: nochg: No update required; unnecessary attempts to change to the current address are considered abusive
tweedleburg:~/svn/ddclient #