|| Internet || LAN 192.168.1.6 | || +--- Linux Server | 118.111.38.171|| | 192.168.1.128 ---+--------------------- Router -----------+--- Windows | ||192.168.1.1 | 192.168.1.129 | || +--- Mac checkip.dyndns.org || | 192.168.1.64 || +--- Printer ||
$ sudo yum -y install ddclient
# diff -u ddclient.conf.original ddclient.conf --- ddclient.conf.original 2010-07-18 01:14:06.758300660 +0900 +++ ddclient.conf 2010-07-18 02:02:10.547551166 +0900 @@ -50,7 +50,7 @@ #use=fw, fw=192.168.1.254/status.htm, fw-skip='IP Address' # found after IP Address # ## To obtain an IP address from Web status page (using the proxy if defined) -#use=web, web=checkip.dyndns.org/, web-skip='IP Address' # found after IP Address +use=web, web=checkip.dyndns.org/, web-skip='IP Address' # found after IP Address # #use=ip, ip=127.0.0.1 # via static IP's #use=if, if=eth0 # via interfaces @@ -61,11 +61,11 @@ #server=members.dyndns.org # default server #server=members.dyndns.org:8245 # default server (bypassing proxies) -#login=your-login # default login -#password=test # default password +login=*************** # default login +password=*************** # default password #mx=mx.for.your.host # default MX -#backupmx=yes|no # host is primary MX? -#wildcard=yes|no # add wildcard CNAME? +backupmx=no # host is primary MX? +wildcard=no # add wildcard CNAME? ## ## dyndns.org dynamic addresses @@ -81,10 +81,10 @@ ## ## (supports variables: wildcard,mx,backupmx) ## -# static=yes, \ -# server=members.dyndns.org, \ -# protocol=dyndns2 \ -# your-static-host.dyndns.org +static=yes, \ +server=members.dyndns.org, \ +protocol=dyndns2 \ +hondou.homedns.org ## ##
# ddclient -daemon=0 -verbose CONNECT: checkip.dyndns.org CONNECTED: using HTTP SENDING: GET / HTTP/1.0 SENDING: Host: checkip.dyndns.org ... SUCCESS: hondou.homedns.org: skipped: IP address was already set to 118.111.38.171.
# /etc/init.d/ddclient start ddclient を起動中: [ OK ]
自動起動するようにする
# /sbin/chkconfig --level 35 ddclient on # /sbin/chkconfig --list | grep ddclient ddclient 0:off 1:off 2:off 3:on 4:off 5:on 6:off
[root@orange cron.hourly]# cat 1ddclient #!/bin/bash # /usr/sbin/ddclient -daemon=0 -verbose -noquiet /usr/sbin/ddclient -daemon=0