Pfsense não atualiza dyndns
-
Pessoal,
Observei que o pfsense ele não faz checagem do dyndns.. em relação ao ip que está atualizado no site do dyndns.
Notei quando os dominio foram excluídos, esqueci de pagar a renovação. rsrsrs,
ai eu criei os dominio novamente.. com o ip da minha maquina, só que dos meus clientes.. o pfsense não atualizou.. foi necessário reiniciar o mesmo.. alguem sabe como posso resolver ou até mesmo criar um script que faz essa checagem. ? tenho isso no mikrotik e funciona perfeitamente..# Set needed variables :local username "usuario" :local password "senha" :local hostname "empresa.dyndns.info" :global systemname [/system identity get name] :if ($systemname = "Site1" ) do= { :set hostname "empresa.dyndns.info" } :global dyndnsForce :global previousIP # 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" :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 "" -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 /tool fetch user=$username password=$password mode=http address="members.dyndns.org" \ src-path="/nic/update?hostname=$hostname&myip=$currentIP" dst-path="/dyndns.txt" :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") }