วันอังคารที่ 5 มีนาคม พ.ศ. 2562

freeddns

:global AfraidUser "user_name"
:global AfraidPass "password"
:global WANInter "interface_name"
:global AfraidDomain "domain_name"

:global IpCurrent [/ip address get [find interface=$WANInter] address];
:for i from=( [:len $IpCurrent] - 1) to=0 do={ 
  :if ( [:pick $IpCurrent $i] = "/") do={ 
    :global NewIP [:pick $IpCurrent 0 $i];
    :if ([:resolve $AfraidDomain] != $NewIP) do={
      /tool fetch mode=http url="fetchable_URL_goes_here" keep-result=no
      :log info "Afraid.org Update: $AfraidDomain - $NewIP"
     } else={
     :log info "Afraid.org: don't need updates";
    }
   } 
}




http://freedns.afraid.org