#:log info "Weryfikuje publiczne IP..." :local Mywan "Moja_nazwa_WAN_PPPoE" :local NOIPUser "moj_iser_no-ip.pl" :local NOIPPass "moje_haslo_no-ip.pl" :local NOIPDomain "moja_domena.noip.pl" :local NOIPhttp "https://update.no-ip.pl" :local IpCurrentMeIncludingMask [/ip address get [find interface=$Mywan] address]; #:log info "IpCurrentMeIncludingMask: $IpCurrentMeIncludingMask" :for i from=( [:len $IpCurrentMeIncludingMask] - 1) to=0 do={ :if ( [:pick $IpCurrentMeIncludingMask $i] = "/") do={ :local IpCurrentMe [:pick $IpCurrentMeIncludingMask 0 $i]; #:log info "IpCurrentMe: $IpCurrentMe" :local IpCurrentNoip [:put [:resolve $NOIPDomain]]; #:log info "IpCurrentNoip: $IpCurrentNoip" :if ($IpCurrentNoip != $IpCurrentMe) do={ /tool fetch mode=https user=$NOIPUser password=$NOIPPass url="$NOIPhttp/\3Fhostname=$NOIPDomain" keep-result=no :log info "NO-IP Update: $NOIPDomain - from: $IpCurrentNoip to: $IpCurrentMe" /ip dns cache flush } } }