[DNS]
【原创】建立 在 linux 通过 dynamic dns 建立自己的个人网站。
It is too troublesome to set up your own website ,since your ip address is dynamic.
It is a blessing that some saviors DO provide FREE service to map you dnsname to
your dynamic ip address.
such as www.ods.org.
Create account.
download ODS client .
complie ODS client.
finally.
You need to build your own script to wrap it up
It can be accomplished in two ways.
(1).
#touch /etc/ppp/ip-up.local
#chmod +x ip-up.local
#vi ip-up.local
./odsclient YourName YourPassword Yourdomainname $4 &
it should work.But ip-up was not triggered in my box ,so i build the following script.
(2).
#!/bin/bash
echo $$ >; adslpid
InIp=$(ip addr sh dev ppp0 |grep inet|awk '{print $2}')
while :
do
CNT=$(netstat -in |grep ppp0 |wc -l)
if [ $CNT -ne 0 ]
then
ReIp=$(ip addr sh dev ppp0 |grep inet|awk '{print $2}')
if [ $InIp != $ReIp ]
then
InIp=$(ip addr sh dev ppp0 |grep inet|awk '{print $2}')
#echo $InIp
./odsclient YourName YourPassword yourdomainname $InIp &
fi
fi
sleep 300
done
Try my website: http://fargo.daemon.sh:86.