I have used www.cjb.net since 4 years ago
I like very much this service, and i think it's a very good service (it's very quick in refreshing dns and it gives short domain name as YOURDOMAINNAME.cjb.net)
The only problem is that nobody use it and routers producer prefers other dynamicdns services (also in openwrt!!)
So i make my script for updating cjb dns
root@OpenWrt:~# cat /local/script/cjb-update
#!/bin/sh
# logger Checking cjb ip
USER="YOURCJBUSERNAME"
PASS="YOURCJBPASSWORD"
if [ ! -d /tmp/cjb ]
then
mkdir /tmp/cjb
fi
if [ -f /tmp/cjb/cjbip ]
then
past_ip=`cat /tmp/cjb/cjbip`
else
past_ip="first"
fi
current_ip=$(ifconfig ppp0 | grep "inet addr" | awk '{print $2}' | awk -F ':' '{print $2}')
if [ ${past_ip} != ${current_ip} ] ; then
exec wget -q -O /tmp/cjb/cjb.htm -q "http://www.cjb.net/cgi-bin/dynip.cgi?username=$USER&password=$PASS" 2>&1 &
echo $current_ip > /tmp/cjb/cjbip
echo $(date) -- $current_ip >> /tmp/cjb/cjbip.history
logger Update $USER.cjb.net to Your IP $current_ip
rm /tmp/cjb/cjb.htm
fi
after created that file (you can put it where you prefer or call it as you like), you have to set it executable
chmod +x /local/script/cjb-update
Now there are 2 ways to proced or both if you prefer
1- use crontab for scheduling script (ES every 5 minutes)
2-if you use ppp to connetc to internet, you can call script from /etc/ppp/ip-up
#!/bin/sh
sleep 20
logger new connection updating cjbip
/local/script/cjb-update &
NOTE i used sleep 20 becouse script have to wait a bit after ppp connect (or somethimes it try to update cjbdns to early)
any suggestions is appreciated
Yeah dude!