Community discussions

 
done411
just joined
Topic Author
Posts: 6
Joined: Wed Jan 16, 2019 10:36 am

DynDns Script (No Logs)

Wed Jan 16, 2019 10:46 am

Hi,

i have tried out different scripts (with admin account) to get DynDNS work, but no luck.
Every script i try to run nothing happened in the log window?
Thanks for help in advance.

My Script:

:global ddnsuser "xxx"
:global ddnspass "xxx"
:global theinterface “ether1”
:global ddnshost xxx.com
:global ipddns [:resolve $ddnshost];
:global ipfresh [ /ip address get [/ip address find interface=$theinterface ] address ]
:if ([ :typeof $ipfresh ] = nil ) do={
 :log info ("DynDNS: No ip address on $theinterface .")
} else={
 :for i from=( [:len $ipfresh] - 1) to=0 do={
 :if ( [:pick $ipfresh $i] = "/") do={
 :set ipfresh [:pick $ipfresh 0 $i];
}
}

:if ($ipddns != $ipfresh) do={
 :log info ("DynDNS: IP-DynDNS = $ipddns")
 :log info ("DynDNS: IP-Fresh = $ipfresh")
 :log info "DynDNS: Update IP needed, Sending UPDATE...!"
 :global str "/nic/update\?hostname=$ddnshost&myip=$ipfresh&wildcard=NOCHG&mx=NOCHG&backmx=NOCHG"
/tool fetch address=members.dyndns.org src-path=$str mode=http user=$ddnsuser \
password=$ddnspass dst-path=("/DynDNS.".$ddnshost)
 :delay 1
 :global str [/file find name="DynDNS.$ddnshost"];
/file remove $str
 :global ipddns $ipfresh
 :log info "DynDNS: IP updated to $ipfresh!"
} else={
 :log info "DynDNS: dont need changes";
}
}
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 1302
Joined: Sat Dec 24, 2016 11:17 am
Location: jo.overland at gmail.com

Re: DynDns Script (No Logs)

Wed Jan 16, 2019 4:28 pm

Not directly answer for you question, but why no use cloud service?
It will give you a free Mikrotik DNS name.
And if you still need your DynDNS name, point it to your MT cloud DNS.
Then all will update itself, no script needed.
 
How to use Splunk to monitor your MikroTik Router

MikroTik->Splunk
 
 
dadoremix
Member Candidate
Member Candidate
Posts: 116
Joined: Sat May 14, 2011 11:31 am

Re: DynDns Script (No Logs)

Mon Jan 21, 2019 9:12 pm

And if you still need your DynDNS name, point it to your MT cloud DNS.
Then all will update itself, no script needed.
how do that?
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 1302
Joined: Sat Dec 24, 2016 11:17 am
Location: jo.overland at gmail.com

Re: DynDns Script (No Logs)

Mon Jan 21, 2019 10:56 pm

Setup IP->Cloud on you Router.
You will be give an DNS some like this:
6f331abe0a160.sn.mynetname.net
Not 100% if this work, but on dyndns.com you should be able to add DNS name instead of IP. May years since I used their service.

So if your dyndns.com name is: myhost.dyndns.com and your IP is 195.32.12.42, it would be
myhost.dyndns.com->6f331abe0a160.sn.mynetname.net->195.32.12.42
instead of
myhost.dyndns.com->195.32.12.42
But why use dyndns service at all. You can get it for free, but you have to verify it every month or pay 55$ year.
Why not buy your own domain like mycompanyxtc.com for around 12$ a year and you can register as many DNS name as you like.
 
How to use Splunk to monitor your MikroTik Router

MikroTik->Splunk
 
 
dadoremix
Member Candidate
Member Candidate
Posts: 116
Joined: Sat May 14, 2011 11:31 am

Re: DynDns Script (No Logs)

Mon Jan 21, 2019 11:03 pm

I try like you say
Cant type dns name in ip adress box
I try redirect host
Also dont work

and .. dyndns is last 2-3 year only pay version . no free anymore.
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 1302
Joined: Sat Dec 24, 2016 11:17 am
Location: jo.overland at gmail.com

Re: DynDns Script (No Logs)

Thu Jan 24, 2019 8:18 am

I do use noip.com. There you can use DNS Alias. But I do not see how to change a currently registered DNS to use DNS alias, but for new site you can do. Look at attached picture.
.
noip.jpg
You do not have the required permissions to view the files attached to this post.
 
How to use Splunk to monitor your MikroTik Router

MikroTik->Splunk
 
 
anav
Forum Guru
Forum Guru
Posts: 2967
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada

Re: DynDns Script (No Logs)

Thu Jan 24, 2019 7:56 pm

Serious question: How does MT cloud know that my MT wanip has changed?

Fun questions:
If I was really paranoid I would ask who has access to this MT cloud, MT, Latvian govt, who is the next door neighbour of hacking repute!!
If I was really really paranoid, I would suspect hardware/firmware made in China had a backdoor and the OS co-opted by Russia would have a software backdoor.
Either way I might as well bend over ;-)
I'd rather manage rats than software. Follow my advice at your own risk! (Sob & mkx forced me to write that!)
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 1302
Joined: Sat Dec 24, 2016 11:17 am
Location: jo.overland at gmail.com

Re: DynDns Script (No Logs)

Thu Jan 24, 2019 10:35 pm

I would guess it works like other dyn dns system.
Router sends a packet with some ID (serial number) to MT. MT sees the IP and the ID and update the Cloud with the IP it sees.
 
How to use Splunk to monitor your MikroTik Router

MikroTik->Splunk
 
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6283
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: DynDns Script (No Logs)

Fri Jan 25, 2019 10:31 am

Serious question: How does MT cloud know that my MT wanip has changed?

Fun questions:
If I was really paranoid I would ask who has access to this MT cloud, MT, Latvian govt, who is the next door neighbour of hacking repute!!
If I was really really paranoid, I would suspect hardware/firmware made in China had a backdoor and the OS co-opted by Russia would have a software backdoor.
Either way, I might as well bend over ;-)
when you set up your IP Cloud request (either old one or new one) router forms a request and includes router identification information, (that itself is encrypted) then encrypts the payload of the packet and then sends it over yonder to us. At our side, the packet is received and we attempt to decrypt it with a specific key. If the packet is damaged, it is discarded. If it is OK, then the identification information is decrypted and the necessary updates are made depending on what was the request you sent - either DDNS update or just time-zone guess or clock (for the new cloud, backup file upload request)

We like to think that only select employees have access to the servers in our data centres. Traffic analysis does not indicate any intruder activity. IP Cloud has no abilities to alter settings on the router but the select ones that are mentioned in the manual. Also, if you do upload the backup file, it is encrypted by the router before it is sent over using the encryption key you enter yourself. An unencrypted file is not accepted by upload software. Oh and backup file is encrypted using aes-sha256


About your last comment - that everyone is couped - well, set up a firewall as tight as you can and nobody will be able to break into your router even if you have a vulnerable version installed. However, do update to safe version and ensure the strength of your firewall if you want to be sure that you are the only user of your router.

Who is online

Users browsing this forum: No registered users and 12 guests