Обнаружена блокировка рекламы: Наш сайт существует благодаря показу онлайн-рекламы нашим посетителям. Пожалуйста, подумайте о поддержке нас, отключив блокировщик рекламы на нашем веб-сайте.
Подскажите как обновить запись DynDNS? вот скрипт, которым я это пытаюсь делать. На версии 6.1 он работал без проблем. после обновления до 6.10 перестало работать. Перепробывал в том числе скрипты из wiki и др. варианты - ничего не работает, запись не обновляется.
:global adslip :global adsllastip :global datum [/system clock get date] :global vrijeme [/system clock get time] :global ime [/system identity get name]
#IF lastip is non existant - set it to "0" :if ([ :typeof $adsllastip ] = nil ) do={ :global adsllastip "0" }
#Set variable with actual ADSL address :global adslip [ /ip address get [/ip address find interface=ADSL ] address ]
#If not existant - log it :if ([ :typeof $adslip ] = nil ) do={ :log error "=== No IP on ADSL Interface" } else={
:log info "=== Updating dns record at DynDNS" :local str "/nic/update?hostname=$dynhost&myip=$adslip&wildcard=NOCHG&mx=NOCHG&backmx=NOCHG" /tool fetch address=members.dyndns.org src-path=$str mode=http user=$dynuser password=$dynpass dst-path=("/DynDNS.$dynhost")
# print some debug info #:log info ("UpdateDynDNS: username = $username") #:log info ("UpdateDynDNS: password = $password") #:log info ("UpdateDynDNS: hostname = $hostname") #:log info ("UpdateDynDNS: previousIP = $previousIP")
# get the current IP address from the internet (in case of double-nat) /tool fetch mode=http address="checkip.dyndns.org" src-path="/" dst-path="/dyndns.checkip.html" :delay 1 :local result [/file get dyndns.checkip.html contents]
# parse the current IP result :local resultLen [:len $result] :local startLoc [:find $result ": " -1] :set startLoc ($startLoc + 2) :local endLoc [:find $result "</body>" -1] :local currentIP [:pick $result $startLoc $endLoc] # :log info "UpdateDynDNS: 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 DynDNS!
# :set dyndnsForce true
# Determine if dyndns update is needed # more dyndns updater request details http://www.dyndns.com/developers/specs/syntax.html
:if (($currentIP != $previousIP) || ($dyndnsForce = true)) do={ :set dyndnsForce false :set previousIP $currentIP :log info "$currentIP or $previousIP" /tool fetch user=$username password=$password mode=http address="members.dyndns.org" \ src-path="nic/update?system=dyndns&hostname=$hostname&myip=$currentIP&wildcard=no" \ dst-path="/dyndns.txt" :delay 1 :local result [/file get dyndns.txt contents] :log info ("UpdateDynDNS: Dyndns update needed") :log info ("UpdateDynDNS: Dyndns Update Result: ".$result) :put ("Dyndns Update Result: ".$result) # } else={ # :log info ("UpdateDynDNS: No dyndns update needed") }
12345 - заменить на свое, необходимые сообщения в логе - раскомментить.