Hurricane Electric's IPv6 Tunnel Broker Forums

Advanced search  

News:

Welcome to Hurricane Electric's Tunnelbroker.net forums!

Author Topic: Update record from Synology  (Read 4591 times)

pamart

  • Newbie
  • *
  • Posts: 1
Update record from Synology
« on: December 05, 2012, 02:46:18 AM »

Hello,

I would like to update a DDNS record from my synology...

In Dynamic DNS, there is no option for Hurricane Electric  >:(

I know i can write a script to do that, unfortunately my knowledge with linux is verry limited, so if someone can help me i wll be verry happy  ;D

Thank you.
Fred
Logged

pirulo

  • Newbie
  • *
  • Posts: 1
Re: Update record from Synology
« Reply #1 on: November 19, 2022, 11:51:23 AM »

you can add a PERSONAL PROVIDER in CONTROL PANEL-EXTERNAL ACCESS_DDNS

Service Provider: Hurricane
Query URL: __HOSTNAME__:__PASSWORD__@dyn.dns.he.net/nic/update?hostname=__HOSTNAME

Then save and Add DDNS:

Provider: *Hurricane
Host name: example.com (record A or AAAA)
User: example.com
Password:your dinamic password in ddns.he.net

test conexion and save

I can update my dinamics ip records A and AAAA

Before i use a script than run in task every 30 minutes

SCRIPT
Save as hurricane.sh and install the packet curl

*****************************************************
#!/bin/bash
set -u

SALIDA="0"
MyIPV4="$(curl -s -4 icanhazip.com)"
MyIPV6="$(curl -s -6 icanhazip.com)"
IPWEB4="$(nslookup -type=A reno.gq | grep Address | sed -n '$p' | sed 's/Address: //g')"
#IPWEB6="$(nslookup -type=AAAA reno.gq | grep address | sed 's/has AAAA address//g' | sed 's/reno.gq//g;s/^[ \t]*//')"
IPWEB6="$(nslookup -type=AAAA reno.gq | grep Address | sed -n '$p' | sed 's/1.1.1.1#53//g'| sed 's/Address://g' | sed 's/reno.gq//g;s/^[ \t]*//')"


echo "Mi IPv4: $MyIPV4"
echo "IPWEB4: $IPWEB4"
echo "Mi IPv6: $MyIPV6"
echo "IPWEB6: $IPWEB6"

if [ "$MyIPV4" != "$IPWEB4" ]
  then
   curl -4 "EXAMPLE.COM:PASSWORD@dyn.dns.he.net/nic/update?hostname=EXAMPLE.COM"
   echo "\nDNS4 updated"
   SALIDA="1"
fi
if [ "$MyIPV6" != "" ]
 then
   if [ "$MyIPV6" != "$IPWEB6" ]
     then
         curl -6 "EXAMPLE.COM:PASSWORD@dyn.dns.he.net/nic/update?hostname=EXAMPLE.COM"
      echo "\nDNS6 updated"
      SALIDA="1"
   fi
 else
   echo "Mi IPv6 is empty\n"
   SALIDA="1"
fi
if [ "$SALIDA" == "1" ]
  then
   exit 1
fi
exit 0

**************************************************************
Logged