Community discussions

MikroTik App
 
User avatar
corecasys
just joined
Topic Author
Posts: 11
Joined: Wed Apr 04, 2012 5:28 am
Contact:

problem about user name in noip.com script.

Mon Mar 13, 2023 1:53 pm

Currently I be a member of NOIP.com and paid for the yearly charge. In my NOIP Account I could separate each host to each password. Please look at picture below.

Image

My problems is the use name is contain the symbol “:” (Colon). When I put the user name for example “nj:nj@corecasys.com”. The script will not available. Because the symbol “:” is a part of command in the script. Even I put “” in this code it still not available.

How do it put symbol ‘:’ (Colon) as a user name in my script ??? Please accept my extreme thanks for your kindness in advanced.
 
User avatar
corecasys
just joined
Topic Author
Posts: 11
Joined: Wed Apr 04, 2012 5:28 am
Contact:

Re: problem about user name in noip.com script.

Mon Mar 13, 2023 2:00 pm

example my script

# Set needed variables
:global username "nj:nj@corecasys.com"
:global password "password"
:global hostname "njexample.corecasys.net"
:global wanInt "pppoe-out1"
:global noipForce
:global previousIP2

# print some debug info
#:log info ("DDNS: username = $username")
#:log info ("DDNS: password = $password")
:log info ("DDNS: hostname = $hostname")
:log info ("DDNS: previousIP = $previousIP2")


# Grab the current IP address on that interface.
:global ddnsip [/ip address get [/ip address find interface="$wanInt"] address]
:global currentIP [:pick $ddnsip 0 [:find $ddnsip "/"]]

#:log info ("DDNS: ddnsip = $ddnsip")
:log info ("DDNS: currentIP = $currentIP")

# Remove the # on next line to force an update every single time - useful for debugging, but you could end up getting blacklisted by No-IP!
#:set noipForce true

# Determine if no-ip update is needed
# more no-ip updater request details available at http://www.no-ip.com/integrate/request/
:if (($currentIP != $previousIP2) || ($noipForce = true)) do={
:set noipForce false
:set previousIP2 $currentIP
:log info ("DDNS: No-IP update needed")
:log info ("DDNS: Start of Fetch")
global tmp [/tool fetch mode=http port=80 address=dynupdate.no-ip.com host=dynupdate.no-ip.com src-path="/nic/update?hostname=$hostname&myip=$currentIP" user=$username password=$password dst-path="/noip2.txt"]
:log info ("DDNS: End of Fetch")
:global result [/file get noip2.txt contents]
:log info ("DDNS: No-IP Update Result: $result")
:put ("No-IP Update Result: $result")
# Update HE.net Tunnel
# :execute script=HE-NET
} else={
:log info ("DDNS: No No-IP update needed")
}
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: problem about user name in noip.com script.

Mon Mar 13, 2023 2:09 pm

EDIT: added details, see next post
Last edited by rextended on Mon Mar 13, 2023 11:33 pm, edited 3 times in total.
 
User avatar
corecasys
just joined
Topic Author
Posts: 11
Joined: Wed Apr 04, 2012 5:28 am
Contact:

Re: problem about user name in noip.com script.

Mon Mar 13, 2023 2:41 pm

Thank 'restended'. You may not understand my question. If you read it carefully. You will not said "Why you complicate your life uselessly?". :)

My email just 'nj@corecasys.com'. In part of the 'nj:nj@corecasys.com'. The NOIP defined that if i want to used difference password for each host name. I must created group name and follows by my email which i were applied with the NOIP. Please read carefully in picture below.

Image

However thank for your try.
:global username "\"nj:nj\"@insertspammersitehere.com"
your code was not work.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: problem about user name in noip.com script.

Mon Mar 13, 2023 2:44 pm

Is not my code...
https://datatracker.ietf.org/doc/html/r ... tion-3.2.1

P.S.:
why http and not httpS?
fetch do not support redirect.

You read the instructions?
Like not....
Authorization: base64-encoded-auth-string should be the base64 encoding of username:password.
GET /nic/update?hostname=mytest.example.com&myip=192.0.2.25 HTTP/1.1
Host: dynupdate.no-ip.com
Authorization: Basic base64-encoded-auth-string
User-Agent: Company DeviceName-Model/FirmwareVersionNumber maintainer-contact@example.com
For example
nj:nj@corecasys.com = bmo6bmpAY29yZWNhc3lzLmNvbQ==
and must you encode also the password inside...
Last edited by rextended on Mon Mar 13, 2023 2:58 pm, edited 1 time in total.
 
erlinden
Forum Guru
Forum Guru
Posts: 1920
Joined: Wed Jun 12, 2013 1:59 pm
Location: Netherlands

Re: problem about user name in noip.com script.

Mon Mar 13, 2023 2:58 pm

My I ask why you don't use the buildin service in MikroTik?

/ip/cloud
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: problem about user name in noip.com script.

Mon Mar 13, 2023 2:59 pm

Probably because is not the domain "jeff.corecasys.net"...
 
User avatar
corecasys
just joined
Topic Author
Posts: 11
Joined: Wed Apr 04, 2012 5:28 am
Contact:

Re: problem about user name in noip.com script.

Mon Mar 13, 2023 9:14 pm

rextended > I don't understand your answer. My question is simple. How to solve my user name "nj:nj@corecasys.com". Please see picture below.

Image

for the code as i mentioned above. It working properly if i use the normal user name standard format..

erlinden > i don't use ip/cloud because the ip cloud format is not human reading. It's very diffiult to remember.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: problem about user name in noip.com script.

Mon Mar 13, 2023 11:10 pm

How to solve my user name "nj:nj@corecasys.com"
I-have-already-reply-to-you-on-previous-post
But I have also readed the instruction on noip.com....

You read the instruction for group update or you are able only to copy&paste?
https://www.noip.com/integrate/request

Also why you do not ask help where you copy & paste the script? (January 14, 2014)
https://robby1609.wordpress.com/2014/01 ... ing-no-ip/
The script is 9 years old....

Or from the (probably) original authors? (Desember 15, 2012)
https://hendrainfo.wordpress.com/2012/1 ... -mikrotik/
NO... is 11 years old....

NO.... one moment....
Is stolen again from here (11 Jan 2012)
viewtopic.php?t=58304#p298435

You understand that after 12 years syntax can be changed?...
(The script is for RouterOS 5.11)

Who is online

Users browsing this forum: No registered users and 25 guests