Can anyone share script for dnsexit behind nat?I am upgraded my hap lite to v 6.30.2 and now my old script which one I find in this forum no work with this version.Always when I run it the log say dnsexit no need to update but I am shure that IP is changed.
here is the script
I am connected to the internet (to my isp provider modem-bridge mode)with pppoe protokol on ether1.# Set needed variables
:local username "xxxx"
:local password "xxxxxxx"
:local hostname "xxxxxxx"
:global dyndnsForce
:global previousIP
#:global currentIP
# print some debug info
#:log info ("UpdateDnsExit: username = $username")
#:log info ("UpdateDnsExit: password = $password")
#:log info ("UpdateDnsExit: hostname = $hostname")
#:log info ("UpdateDnsExit: previousIP = $previousIP")
# get the current IP address from the internet (in case of double-nat)
/tool fetch mode=http address="ip.dnsexit.com" src-path="/" dst-path="usb1/dnsexit.tmp" port=80 host=ip.dnsexit.com
:local result [/file get [/file find name=usb1/dnsexit.tmp] contents]
# parse the current IP result
:local resultLen [:len $result]
:local currentIP [:pick $result 0 ($resultLen-1)]
#:log info "UpdateDnsExit: currentIP = $currentIP"
# Remove the # on next line to force an update every single time - useful for debugging,
# but you could end up getting blacklisted by DnsExit!
#:set dyndnsForce true
# Determine if dyndns update is needed
# more dyndns updater request details on DnsExit.com
:if (($currentIP != $previousIP) || ($dyndnsForce = true)) do={
:set dyndnsForce false
:log info "UpdateDnsExit: Current IP $currentIP"
:log info "UpdateDnsExit: Previous IP $previousIP"
:set previousIP $currentIP
/tool fetch mode=http address="www.dnsexit.com" \
src-path="RemoteUpdate.sv?login=$username&password=$password&host=$hostname&myip=$currentIP" \
dst-path="usb1/dnsexit.txt" port=80 host=www.dnsexit.com
:local result [/file get usb1/dnsexit.txt contents]
#:log info "UpdateDnsExit: previousIP = $previousIP"
:log info ("DnsExit: DnsExit update needed")
:log info ("UpdateDnsExit: DnsExit Update Result: ".$result)
:log info ("DnsExit Update Result: ".$result)
} else={
:log info ("UpdateDnsExit: No DnsExit update needed")
}