D
D
Denis2016-01-13 12:29:58
Mikrotik
Denis, 2016-01-13 12:29:58

How to change NO-IP DNS script for Mikrotik?

provider - Rostelecom has recently started transferring clients to "gray IP" My Mikrotik ended up in this network with a gray address 100.104.193.41 and external 81.177.127.230
I found a script on the network :

##############Script Settings##################
:local NOIPUser "user"
:local NOIPPass "*password*"
:local WANInter "FTTB"
###############################################
 
:local NOIPDomain "user.zapto.org"
: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\3Fhostname=$NOIPDomain&myip=$NewIP" keep-result=no
      :log info "NO-IP Update: $NOIPDomain - $NewIP"
     }
   } 
}

The script itself works fine (I tried both options on the link provided), in the log it says:
NO-IP Update : user.zapto.org - 100.104.193.41+
But on the noip.com service itself, the external 81.177.127.230 is set - of course, there is no question of any DynDNS. You manually drive in 100.104.193.41 - everything works fine, there is a connection, as soon as the script has worked, it resolves again to 81.177.127.230 and everything falls off.
Something in the script needs to be corrected, but not strong in this matter, tell me where you can fix it. In Mikrotik itself, the ppoe session rises on the FFTB interface and receives the address 100.104.193.41. Where he manages to dig out and transfer 81.177.127.230 - I'll never know ...
ps: If I execute in the browser line ( as it is written here ):
http://user.zapto.org:*password*@dynupdate.no-ip.com/nic/update?hostname=user.zapto.org&myip=100.104.193.41

Then the address I need is perfectly added, an external one comes through the script ... (

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Denis, 2016-01-13
@Rentable

Issue resolved.
If you send a request like:
then 100.64.0.0 is substituted normally, but if:
then I get a white IP provider. Those. noip.com filters this moment when 100.64.0.0/10
So now we have to think in a different vector. Thank you all for participating!
ps: Found the "correct" DynDNS service --- dnsexit.com Line
like:
Allows you to forcefully insert any numbers in the IP field at all))) It
remains to figure out the script by analogy.

K
Kirill 1, 2016-01-15
@SmileyK

Rentable
Look towards wiki.mikrotik.com/wiki/Manual:IP/Cloud may not need to have a script

L
LESHIY_ODESSA, 2016-01-13
@LESHIY_ODESSA

Here it should not be ether1 :local WANInter "FTTB", but the name of your PPPoE connection.
That is, you saw that you need to install a WAN interface, but you have DUAL ACCESS and that means two WAN interfaces. One local provider (ether1), and the other Internet access (PPPoE).
Mikrotik, like any Linux, distinguishes capital letters, so pppoe in the interface name is not equal to PPPoE.
update I still don't understand, do you need the provider's local IP or an external one?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question