dynamic DNS
Category: /knowledge /linuxTags: linux DNS website
ddclient
cp ddclient /usr/sbin/
mkdir /etc/ddclient
mkdir /var/cache/ddclient
cp sample-etc_ddclient.conf /etc/ddclient/ddclient.conf
vi /etc/ddclient/ddclient.conf
-- and change hostnames, logins, and passwords appropriately
cp sample-etc_rc.d_init.d_ddclient.ubuntu /etc/init.d/ddclient
## enable automatic startup when booting
## check your distribution
chkconfig --add ddclient
## start the first time by hand
/etc/init.d/ddclient start
Send IP to a place
send_ip.sh:
#!/bin/sh
ip_addr=$HOME/doc/dyn.ip.html
wget http://checkip.dyndns.org -O ${ip_addr}
scp ${ip_addr} username@$dest.com:~/doc/
cron job: send the IP everyday
# m h dom mon dow command
* */12 * * * /home/username/bin/send_ip.sh