No, I won't be adding any additional DDNS service. Use DNS-o-matic if your favorite service isn't supported, as they support a wide range of third party services.
But not duckdns. Would be nice if there was a generic set of form fields that could be used. Is it possible to configure DDNS from a command line? Poked around, didn't see anything obvious.
#!/bin/sh
curl -k -s "https://login:password@ipv4.tunnelbroker.net/ipv4_end.php?tid=XXXXXX"
DuckDNS does support https requests for updating IPs. Refer to their FAQs.
Thanks, a start script or a cron job should work.
Create a file called wan-start in /jffs/scripts (make sure jffs is enabled) containing these 2 lines. Change the URL for the one required by your DNS provider, including authentication if needed.
Code:#!/bin/sh curl -k -s "https://login:password@ipv4.tunnelbroker.net/ipv4_end.php?tid=XXXXXX"
Edit: DuckDNS does support https requests for updating IPs. Refer to their FAQs.
I know this is a couple months old, but its exactly where I need help.
I put the below into a file created in Notepad++ and saved as "DuckDNS.wanup" (Minus quote). I used WinCP to transfer it into the /jffs/scripts folder. Then I changed the permission to Octal:700. I entered the Web GUI and hit the Reboot button but the script didn't run. I also unplugged the WAN cable waited 30 secs and plugged back in.
What am I missing?
#!/bin/sh
curl -k -s "https://www.duckdns.org/update/DOMAIN/tokentokentokentokentokentoken"
I know that the URL works (when filled in correctly), because I can paste it into a web browser and it updates my IP address to DuckDNS. Becasue DucksDNS's timestamp isn't extremely accurate, I changed the URL to something else to test the script. I use Zapier for some home automation, so I created a URL hook so at anytime it is visited, Zapier sends me a text message to my phone. This is almost instantaneous. Right now, my .wanup script is using a zapier URL so I know the moment it is triggered.
sleep 30
Code:sleep 30
Thanks for the quick reply!!
I entered the code and did a reboot. No luck.
Any other ideas???
Test it in an ssh session to see the output, don't use -s
or just use afraid.org on dnsomatic
Did you set your script permissions? Try formatting jffs again, once I had to do an extra format
You want to test without the -s because s means silent
I got rid of the -s from the script. No difference.
Reformatted the jffs. No difference.
Here is a dumb question, and maybe this is my problem.
Under Wan>DDNS do I have to have DDNS Client enabled with a custom server? If so, what do I use for the Host name and refresh interval days?
#!/bin/sh
touch /tmp/000wanstarted
sleep 30
curl -k "https://zapier.com/hooks/catch/*******/"
I left my Zapper url in the script as well to see when it updates and so far it has been only once at boot.
I wonder if there is some type of script to look at the wan ip, store it and check it the actual against the stored. If changed, hit the URL to send latest.
<snip>
MYROUTER=$(nvram get computer_name)
MY_WANIPADDR=$(nvram get wan0_ipaddr)
MY_WANIPADDRX=$(cat /tmp/mnt/$MYROUTER/IPADDR.txt)
logger -s -t "($(basename $0))" $$ Previous WAN IP $MY_WANIPADDRX
logger -s -t "($(basename $0))" $$ Current WAN IP $MY_WANIPADDR
# Check if I/P address has changed
if [ "$MY_WANIPADDR" = "$MY_WANIPADDRX" ]; then
echo "My "$ISP" t'Tinterweb IP address is: "$MY_WANIPADDR >>$TEMPFILE
echo "" >>$TEMPFILE
logger -s -t "($(basename $0))" $$ WAN IP unchanged
else
echo "I just got connected t'Tinterweb." >>$TEMPFILE
echo "" >>$TEMPFILE
echo "My new "$ISP" IP address is: >"$MY_WANIPADDR"< was >"$MY_WANIPADDRX"<" >>$TEMPFILE
echo "" >>$TEMPFILE
logger -s -t "($(basename $0))" $$ WAN IP changed!!!
hit URL etc.
# Save the current WAN I/P address
echo $MY_WANIPADDR >/tmp/mnt/$MYROUTER/IPADDR.txt
fi
Yes I hid it. I ssh and everything says ok when I got a reply back.Is that the exact URL you are usuing? or are you subing out your actual domain name and token number so it is hidden?
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!