What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

DDNS afraid.org

hello guys,

i'm using afraid.org freedns services for DDNS with my own (sub)domain. until Asuswrt-Merlin 378.50 i used the sample wget script from afraid.org with cru and put it in /jffs/scripts/services-start

cru a afraid 1,6,11,16,21,26,31,36,41,46,51,56 * * * * sleep 6 ; wget -O - http://freedns.afraid.org/dynamic/update.php?your-private-key-goes-here

i'have already read
https://github.com/RMerl/asuswrt-merlin/wiki/Custom-DDNS

but i still dont't understand how it should work now. should i write a script with the title afraid.org and put it in scripts? then do what in the web-form (Advanced_ASUSDDNS_Content.asp)?

could someone please help me and take me by the hand through the process of setting up DDNS with afraid.org?

Asuswrt-Merlin 378.50 on my RT-AC66U
 
sorry. i think i've understood how it works now. so i'll reply to myself... maybe i can help someone else.

first i read:

https://github.com/RMerl/asuswrt-merlin/wiki/User-scripts

https://github.com/RMerl/asuswrt-merlin/wiki/Custom-DDNS

then i made a script called "ddns-start" in /jffs/scripts/
(nano /jffs/scripts/ddns-start)

inside i pasted


#!/bin/sh

wget -q http://freedns.afraid.org/dynamic/update.php?your-private-key-goes-here -O - >/dev/null

if [ $? -eq 0 ]; then
/sbin/ddns_custom_updated 1
else
/sbin/ddns_custom_updated 0
fi


of course with my own private key (from afraid.org)

then paste
chmod a+rx /jffs/scripts/ddns-start

then i ran
./ddns-start

then i went to
https://192.168.1.1:443/Advanced_ASUSDDNS_Content.asp
and activated the ddns client. i wrote my own hostname (eg xyz.afraid.org) into the field "Hostname" ;-)

after hitting enter i got "registration sucessful"

happy.
 
I haven't looked into the new ddns script thing, but I have a similar setup. I use dnsomatic to update my domain at afraid.org.
 
thank you for your reply, but i didnt use wget with https. i reached the settings-web-server with https. the wget command in the script runs on http (first i tried https but it failed ;-))
 
thank you for your reply, but i didnt use wget with https. i reached the settings-web-server with https. the wget command in the script runs on http (first i tried https but it failed ;-))
My mistake, sorry. As for me, I'm waiting Entware partition to be ready before updating dyndns:
Code:
# cat /jffs/scripts/ddns-start
#!/bin/sh

# Wait up to 15 seconds to make sure /opt partition is mounted
i=0
while [ $i -le 15 ]
do
    if [ -d /opt/tmp ]
    then
        break
    fi
    sleep 1
    i=`expr $i + 1`
done

/opt/bin/wget ...  > /dev/null 2>&1
if [ $? -eq 0 ];
then
    /sbin/ddns_custom_updated 1
    logger -t $(basename $0) "update successfull"
else
    /sbin/ddns_custom_updated 0
    logger -t $(basename $0) "update failed"
fi
 
BTW, I fixed the included curl binary so it should be able to work over SSL now. Might be worth looking at it as an alternative to wget.
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top