Chris,
I believe I've found a solution to our problem.
First, here's a link seeking help from this forum, as you suggested. It did not receive a response, I'm including it here, just to be complete.
https://forum.openwrt.org/viewtopic.php … 58#p242058
I did find a post on the Hughes forum:
https://community.myhughesnet.com/hughe … _responses
This post indicates that the Hughes HT-1000 modem is caching DNS querries. He suggests a solution is to send the querries via TCP rather than UDP.
I've done some playing and this seems to work. I've made some changes to your scripts to experiment with (I'm not as elegant as you, you'll probably want to double check my changes)
host_dig-check-new-address.sh
#!/bin/sh
while : ; do
date
echo "############### host output ###########################"
host -T -t aaaa -6 ayankeeindixie.spdns.de google-public-dns-a.google.com
echo "**************** dig output ****************************"
dig @google-public-dns-a.google.com -t aaaa -6 ayankeeindixie.spdns.de +tcp
echo "-------------------------------------------------------"
sleep 10
done
dynamic_ddns_diaghelper-change6-dig_+tcp_he-addr.sh
#!/bin/sh
#set -vx # script-debugger
### Please uncomment the line with the NAMESERVER to use or edit on
### no spaces around "=" and don't forget double quotes around name or ip address
# NAMESERVER="" # take the systems default
# NAMESERVER="localhost" # local machine
# NAMESERVER="resolver1.opendns.com" # opendns public dns
# NAMESERVER="google-public-dns-a.google.com" # Google public dns
# NAMESERVER="ordns.he.net" # Hurricane Electric public dns
# NAMESERVER="ns1.he.net" # not a public dns-server
# NAMESERVER="palmnut-dns.exetel.com.au" # Australian DNS server
NAMESERVER="google-public-dns-a.google.com"
### Put here the data from your DDNS Provider (between double quotes)
DOMAIN="ayankeeindixie.spdns.de"
USERNAME="ayankeeindixie.spdns.de"
PASSWORD="ifgh-mlpz-qbzb"
### IP to send to your provider - Valid IPv4 or IPv6 address
IP="2001:470:20::2"
# Hurricane Electric Dynamic DNS
# URL="http://$DOMAIN:$PASSWORD@dyn.dns.he.net/nic/update?hostname=$DOMAIN&myip=$IP"
# Securepoint Dynamic-DNS-Service (http://www.spdns.de)
URL="http://$USERNAME:$PASSWORD@update.spdns.de/nic/update?hostname=$DOMAIN&myip=$IP"
##### PLEASE NO CHANGES BLOW THIS LINE #########################################
IP_REGEX="[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}"
IPV4=$(echo $IP | grep -m 1 -o "$IP_REGEX")
[ -z "$IPV4" ] && IP_REGEX="\(\([0-9A-Fa-f]\{1,4\}:\)\{1,\}\)\(\([0-9A-Fa-f]\{1,4\}\)\{0,1\}\)\(\(:[0-9A-Fa-f]\{1,4\}\)\{1,\}\)"
TIME=0
echo ""
/usr/bin/wget -q -O - "$URL" || {
echo -e "\n\tERROR updating your DDNS provider ! Check parameters !\n"
exit 1 # exit on error
}
echo -e "\n\tWaiting for IP change of '$DOMAIN' on nameserver '$NAMESERVER'"
#************* changed host command to dig with specific options billmc ***************
# START_IP=$(host $DOMAIN $NAMESERVER) || {
START_IP=$(dig @$NAMESERVER -t aaaa -6 $DOMAIN +tcp ) || {
#**************************************************************************************
echo -e "\n\tERROR in nslookup ! Please check error message !\n"
exit 1 # exit on error
}
######## Following changes per Chris' directions #########################
#START_IP=$(echo "$START_IP" | sed '1,2d' | grep -o "Name:\|Address.*" | grep -m 1 -o "$IP_REGEX")
START_IP=$(echo "$START_IP" | grep "$DOMAIN" | grep -m 1 -o "$IP_REGEX")
############################################################################
date
echo -e "\tCurrentIP: $START_IP"
[ -z $START_IP ] && exit 1
STOP_IP=$START_IP
until [ "$START_IP" != "$STOP_IP" ]; do
sleep 1
######## Following changes per Chris' directions #########################
# STOP_IP=`nslookup $DOMAIN $NAMESERVER 2>/dev/null | sed '1,2d' | grep -o "Name:\|Address.*" | grep -m 1 -o "$IP_REGEX"`
#************* changed host command to dig with specific options billmc ***************
# STOP_IP=`host $DOMAIN $NAMESERVER 2>/dev/null | grep "$DOMAIN" | grep -m 1 -o "$IP_REGEX"`
STOP_IP=`dig @$NAMESERVER -t aaaa -6 $DOMAIN +tcp 2>/dev/null | grep "$DOMAIN" | grep -m 1 -o "$IP_REGEX"`
#**************************************************************************************
############################################################################
TIME=$(( $TIME + 1 ))
echo -n -e "\b\b\b\b\b\t$TIME"
done
echo -n -e "\b\b\b\b\b"
echo -e "\t NewIP: $STOP_IP"
echo -e "\t Time: $TIME loops (1 second wait time)\n"
date
dynamic_ddns_diaghelper-change7_host_-T_google-addr.sh
#!/bin/sh
#set -vx # script-debugger
### Please uncomment the line with the NAMESERVER to use or edit on
### no spaces around "=" and don't forget double quotes around name or ip address
# NAMESERVER="" # take the systems default
# NAMESERVER="localhost" # local machine
# NAMESERVER="resolver1.opendns.com" # opendns public dns
# NAMESERVER="google-public-dns-a.google.com" # Google public dns
# NAMESERVER="ordns.he.net" # Hurricane Electric public dns
# NAMESERVER="ns1.he.net" # not a public dns-server
# NAMESERVER="palmnut-dns.exetel.com.au" # Australian DNS server
NAMESERVER="google-public-dns-a.google.com"
### Put here the data from your DDNS Provider (between double quotes)
DOMAIN="ayankeeindixie.spdns.de"
USERNAME="ayankeeindixie.spdns.de"
PASSWORD="ifgh-mlpz-qbzb"
### IP to send to your provider - Valid IPv4 or IPv6 address
IP="2001:4860:4860::8888"
# Hurricane Electric Dynamic DNS
# URL="http://$DOMAIN:$PASSWORD@dyn.dns.he.net/nic/update?hostname=$DOMAIN&myip=$IP"
# Securepoint Dynamic-DNS-Service (http://www.spdns.de)
URL="http://$USERNAME:$PASSWORD@update.spdns.de/nic/update?hostname=$DOMAIN&myip=$IP"
##### PLEASE NO CHANGES BLOW THIS LINE #########################################
IP_REGEX="[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}"
IPV4=$(echo $IP | grep -m 1 -o "$IP_REGEX")
[ -z "$IPV4" ] && IP_REGEX="\(\([0-9A-Fa-f]\{1,4\}:\)\{1,\}\)\(\([0-9A-Fa-f]\{1,4\}\)\{0,1\}\)\(\(:[0-9A-Fa-f]\{1,4\}\)\{1,\}\)"
TIME=0
echo ""
/usr/bin/wget -q -O - "$URL" || {
echo -e "\n\tERROR updating your DDNS provider ! Check parameters !\n"
exit 1 # exit on error
}
echo -e "\n\tWaiting for IP change of '$DOMAIN' on nameserver '$NAMESERVER'"
#****************************changed host command to host -T to run over TCP***************************
# START_IP=$(host $DOMAIN $NAMESERVER) || {
START_IP=$(host -T -t aaaa -6 $DOMAIN $NAMESERVER) || {
#******************************************************************************************************
echo -e "\n\tERROR in nslookup ! Please check error message !\n"
exit 1 # exit on error
}
######## Following changes per Chris' directions #########################
#START_IP=$(echo "$START_IP" | sed '1,2d' | grep -o "Name:\|Address.*" | grep -m 1 -o "$IP_REGEX")
START_IP=$(echo "$START_IP" | grep "$DOMAIN" | grep -m 1 -o "$IP_REGEX")
############################################################################
date
echo -e "\tCurrentIP: $START_IP"
[ -z $START_IP ] && exit 1
STOP_IP=$START_IP
until [ "$START_IP" != "$STOP_IP" ]; do
sleep 1
######## Following changes per Chris' directions #########################
# STOP_IP=`nslookup $DOMAIN $NAMESERVER 2>/dev/null | sed '1,2d' | grep -o "Name:\|Address.*" | grep -m 1 -o "$IP_REGEX"`
#****************************changed host command to host -T to run over TCP***************************
# STOP_IP=`host $DOMAIN $NAMESERVER 2>/dev/null | grep "$DOMAIN" | grep -m 1 -o "$IP_REGEX"`
STOP_IP=`host -T -t aaaa -6 $DOMAIN $NAMESERVER 2>/dev/null | grep "$DOMAIN" | grep -m 1 -o "$IP_REGEX"`
#******************************************************************************************************
############################################################################
TIME=$(( $TIME + 1 ))
echo -n -e "\b\b\b\b\b\t$TIME"
done
date
echo -n -e "\b\b\b\b\b"
echo -e "\t NewIP: $STOP_IP"
echo -e "\t Time: $TIME loops (1 second wait time)\n"
The date command in the while loop isn't needed. I stuck it in so I had a reference as to when things took place, in order to compare when the updates took effect. Although, I suppose you could display it in Luci as a refference as to when the last update occurred, this in addition to the countdown until the next forced update.
Specifying an aaaa record seemed to work better than not specifying it, but I don't know if its absolutely necessary. I also specified IPv6. This also seemed to work better for me than not specifying it. Hughes has native IPv6 connectivity, while their IPv4 is NATed. Other folks may not need to use these settings.
As a suggestion, like your did with the HTTPS selection in Luci. Maybe you can make these switches optional, those that don't need it, wouldn't need to select them. On that note, I did not try to send the updates with wget via HTTPS, I suppose we ought to try that.
I use both dig and host here, because they both support specifying IPv6. Both seem to work. I recall you saying that dig may be to large for some routers. Again, for those that have the memory, maybe dig can be also set as an option, with a note stating the package would need to be loaded.
When running the check new addr script, it seemed like it took between 30 seconds to 2 minutes, after the update script finished running, before it showed an address change. Like I said, I'm not very experienced with scripting, so there is most likely something in your script I didn't understand, or something I messed up. Best to check.
Let me know what happens.
Bill
ps
At a later time, if you're willing to help with my education, maybe you could explain to me some of the lines of code in the script that I don't understand?