DynDNSは、固定でないグローバルIPアドレスとインターネット上のFQDN名を対応づけるサービスです。
DynDNSへの登録は、サイト側の説明の通りやればいいとして、問題となるのはIPアドレスが変更されたときに、
それをDynDNSに通知する方法です。
DynDNSには、そのための様々なソフトウェアがあり、ここではddclientを用います。
ddclientは、300secごとに、ADSLルータのWAN側IPアドレスを監視して、変更があればDynDNSの登録内容を変更します。
[Yast]-[ソフトウェア]-[ソフトウェアのインストール/削除]で、ddclientをインストールします。
インストールの最後で言われたとおり、/etc/ddclient.conf を編集します。
# vi /etc/ddclenet.conf ddclientの設定(L15-L19) とりあえずそのまま 15 daemon=300 # check every 300 seconds 16 syslog=yes # log update msgs to syslog 17 mail=root # mail all msgs to root 18 mail-failure=root # mail failed update msgs to root 19 pid=/var/run/ddclient.pid # record PID in file. ADSLルータの設定(L37-L40) Planex BLW-04GでWAN側IPアドレスを取得するための設定 たいていのADSLルータで使えるはず 37 fw-login=user,fw-password=**** # FW login and password BLW-04Gではユーザ名を設定できないが、何を設定してもパスワードさえ合っていれば ログインできる 38 # 39 ## To obtain an IP address from FW status page (using fw-login, fw-password) 40 use=fw, fw=192.168.1.1/Status.asp, fw-skip='WAN側IPアドレス' # found after IP Address ADSLルータのステータス表示ページ(http://192.168.1.1/Status.asp)で、 'WAN側IPアドレス'という文字列の次にWAN側IPアドレスがくる DynDNSの設定(L54-) 54 login=**** # default login 55 password=**** # default password 56 #mx=mx.for.your.host # default MX 57 backupmx=no # host is primary MX? 58 wildcard=no # add wildcard CNAME? 59 60 ## 61 ## dyndns.org dynamic addresses 62 ## 63 ## (supports variables: wildcard,mx,backupmx) 64 ## 65 # server=members.dyndns.org, \ 66 # protocol=dyndns2 \ 67 # your-static-host.dyndns.org 68 69 ## 70 ## dyndns.org static addresses 71 ## 72 ## (supports variables: wildcard,mx,backupmx) 73 ## 74 static=yes, \ 75 server=members.dyndns.org, \ 76 protocol=dyndns2 \ 77 hondou.homedns.org
設定を試してみると、ADSLルータからWAN側のIPアドレスがとれているようです
# /usr/sbin/ddclient -query use=if, if=eth0 address is 192.168.1.6 use=if, if=eth1 address is NOT FOUND use=if, if=lo address is 127.0.0.1 use=if, if=sit0 address is NOT FOUND use=fw, fw=192.168.1.1/Status.asp address is 219.198.16.13 use=web, web=dnspark address is 219.198.16.13 use=web, web=dyndns address is 219.198.16.13
# vi /etc/init.d/ddclient 
#!/bin/sh
#
# ddclient      This shell script takes care of starting and stopping
#               ddclient.
#
# chkconfig: 2345 65 35
# description: ddclient provides support for updating dynamic DNS services.
[ -f /etc/ddclient.conf ] || exit 0
PATH=/usr/sbin:${PATH}
COLUMNS=9999
export PATH COLUMNS
program=ddclient
# See how we were called.
case "$1" in
  start)
        # Start daemon.
        echo -n "Starting ddclient: "
        ddclient -daemon 300
        echo
        ;;
  stop)
        # Stop daemon.
        echo -n "Shutting down ddclient: "
        kill `ps -aef | awk '/[ \/]ddclient/ { print $2}'`
        echo
        ;;
  restart)
        $0 stop
        $0 start
        ;;
  status)
        pids=`ps -aef | awk '/[ \/]ddclient/ { print $2}'`
        if test "$pids"
        then
                for p in $pids
                do
                        echo "$program (pid $p) is running"
                done
        else
                echo "$program is stopped"
        fi
        ;;
  *)
        echo "Usage: ddclient {start|stop|restart|status}"
        exit 1
esac
exit 0
:wq 
# chmod +x /etc/init.d/ddclient