Difference between revisions of "Dyndns"

From Linuxintro
imported>ThorstenStaerk
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[http://www.dyndns.org 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
+
[http://www.dyndns.org 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
 
* an account at http://www.dyndns.org
 
* an account at http://www.dyndns.org
 
* a daemon ddclient running on your computer
 
* a daemon ddclient running on your computer
  
This article describes how you get a daemon running on your computer. Download [http://sourceforge.net/apps/trac/ddclient ddclient] like this:
+
= Get it =
  yast -i subversion
+
This article describes how you get a daemon running on your computer. Just [[find out your distribution]] and proceed accordingly:
 +
 
 +
== SUSE Linux 12.1 ==
 +
Install ddclient using the [[command]]
 +
yast -i ddclient
 +
 
 +
Configure it by editing /etc/ddclient.conf:
 +
protocol=dyndns2
 +
use=web
 +
login=''yourusername''
 +
password=''yourpassword''
 +
''yourhostname''.dyndns.org
 +
 
 +
Now edit the crontab to contain a call to dyndns.
 +
<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>
 +
And restart cron
 +
/etc/init.d/cron restart
 +
 
 +
== SUSE Linux 11.4 ==
 +
Download [http://sourceforge.net/apps/trac/ddclient ddclient] like this:
 +
  [[yast]] -i [[subversion]]
 +
[[cd]]
 
  svn co https://ddclient.svn.sourceforge.net/svnroot/ddclient/trunk ddclient
 
  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.
 +
<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>
 +
And restart cron
 +
/etc/init.d/cron restart
 +
 +
= Screenlog =
 +
<pre>
 +
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 #
 +
</pre>

Latest revision as of 05:37, 8 January 2012

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

Get it

This article describes how you get a daemon running on your computer. Just find out your distribution and proceed accordingly:

SUSE Linux 12.1

Install ddclient using the command

yast -i ddclient

Configure it by editing /etc/ddclient.conf:

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

Now edit the crontab to contain a call to dyndns.

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

And restart cron

/etc/init.d/cron restart

SUSE Linux 11.4

Download ddclient like this:

yast -i subversion
cd
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.

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

And restart cron

/etc/init.d/cron restart

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 #