Community discussions

MikroTik App
 
User avatar
qatar2022
Member Candidate
Member Candidate
Topic Author
Posts: 156
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
Long time Member
Long time Member
Posts: 675
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: 319
Joined: Thu Sep 09, 2021 5:46 pm
Location: Alhambra's City

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).

Who is online

Users browsing this forum: No registered users and 4 guests