Community discussions

MikroTik App
 
User avatar
qatar2022
Member Candidate
Member Candidate
Topic Author
Posts: 181
Joined: Mon Aug 24, 2020 11:12 am

No-IP Updater Scripting

Sun Nov 19, 2023 8:33 am

I have No-IP domine subscription and I have static IP address I would like to run script on Mikrotik RB5009 v7.12 to update No-IP
with regards
 
optio
Forum Guru
Forum Guru
Posts: 1133
Joined: Mon Dec 26, 2022 2:57 pm

Re: No-IP Updater Scripting

Sun Nov 19, 2023 1:54 pm

If you have static IP just update using request like is explained here.

Using ROS fetch tool:
/tool fetch url="https://dynupdate.no-ip.com/nic/update?myip=<YOUR_IP>&hostname=<YOUR_NO_IP_HOST>" user=<USERNAME> password=<PASSWORD>
 
User avatar
diamuxin
Member
Member
Posts: 346
Joined: Thu Sep 09, 2021 5:46 pm

Re: No-IP Updater Scripting

Sun Nov 19, 2023 11:16 pm

Example of noip script without global variables (simpler).

# Data to be modified
:local  noipuser "username"
:local  noippass "MyStr0ngPassWoRd!"
:local  noiphost "mydomain.sytes.net"

# From now on, do not modify
:local  cIP [/ip cloud get public-address]

:if ([:resolve $noiphost] != $cIP) do={
    # Important, has been replaced "?" with "\3F" to avoid problems.  
    /tool fetch url="http://$noipuser:$noippass@dynupdate.no-ip.com/nic/update\3Fhostname=$noiphost&myip=$cIP" keep-result=no
    :log info "NO-IP: $noiphost -> IP updated: $cIP"
} else={
    :log info "No-IP: No update needed. Current: $cIP"
}

Create a Scheduler task and run it a couple of times a day or every x time (according to your needs).
 
Wolvyreen
newbie
Posts: 28
Joined: Thu Aug 29, 2024 4:24 pm

Re: No-IP Updater Scripting

Mon Nov 04, 2024 5:04 pm

Example of noip script without global variables (simpler).

# Data to be modified
:local  noipuser "username"
:local  noippass "MyStr0ngPassWoRd!"
:local  noiphost "mydomain.sytes.net"

# From now on, do not modify
:local  cIP [/ip cloud get public-address]

:if ([:resolve $noiphost] != $cIP) do={
    # Important, has been replaced "?" with "\3F" to avoid problems.  
    /tool fetch url="http://$noipuser:$noippass@dynupdate.no-ip.com/nic/update\3Fhostname=$noiphost&myip=$cIP" keep-result=no
    :log info "NO-IP: $noiphost -> IP updated: $cIP"
} else={
    :log info "No-IP: No update needed. Current: $cIP"
}

Create a Scheduler task and run it a couple of times a day or every x time (according to your needs).
This worked perfectly for me on RouterOS 7.x Thank you. This is so simple and exactly what I needed!
 
devilization
just joined
Posts: 2
Joined: Tue Mar 12, 2013 10:32 am

Re: No-IP Updater Scripting

Sat Jun 07, 2025 9:31 am

hi,

Just an update on this older post: the script failed on MikroTik v7.19.1.
I managed to get it work and have tested it on multiple MikroTik sites based on the guide below.

First, you need 3 information from No-IP (EXAMPLE information)
Username - user@mikrotik.com
Password - mikrotik
Hostname - mikrotik.ddns.net

Go to the Base64 Encode site ie - https://www.base64encode.org
Paste the information as below - which is username:password
user@mikrotik.com:mikrotik

After encode, the result as below
dXNlckBtaWtyb3Rpay5jb206bWlrcm90aWs=

Now paste the information as below - Hostname and Base64
/tool fetch url="https://dynupdate.no-ip.com/nic/update?hostname=mikrotik.ddns.net" \
    http-header-field="Authorization: Basic dXNlckBtaWtyb3Rpay5jb206bWlrcm90aWs=" \
    keep-result=no
Final task, set a schedule in every 30 minutes or your preferred interval
 
CGGXANNX
Long time Member
Long time Member
Posts: 635
Joined: Thu Dec 21, 2023 6:45 pm

Re: No-IP Updater Scripting

Sat Jun 07, 2025 9:41 am

No need for manually building the authentication header, /tool fetch has the parameters user= and password= that you can use to directly pass the login info.