Поиск по тегам
Mikrotik: Настройка ddns сервиса на примере NO-IP.com
Добавляем скрипт:
Переходим в меню System -> Scripts, создаем новый скрипт##############Script Settings##################
:local NOIPUser "login"
:local NOIPPass "password"
:local WANInter "interface"
:local NOIPDomain "domain"
###############################################
:local IpCurrent [/ip address get [find interface=$WANInter] address];
:for i from=( [:len $IpCurrent] - 1) to=0 do={
:if ( [:pick $IpCurrent $i] = "/") do={
:local NewIP [:pick $IpCurrent 0 $i];
:if ([:resolve $NOIPDomain] != $NewIP) do={
/tool fetch mode=http user=$NOIPUser password=$NOIPPass url="http://dynupdate.no-ip.com/nic/update?hostname=$NOIPDomain&myip=$NewIP" keep-result=no
:log info "NO-IP Update: $NOIPDomain - $NewIP"
}
}
}