Community discussions

MikroTik App
 
pgh321
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 58
Joined: Fri Jan 03, 2014 7:35 pm

free dynamic dns ?

Mon Feb 10, 2014 10:03 pm

Hi, looking for a free dynamic dns I found that many providers are not free anymore, or have caveats in their free versions, like you need to log manually to keep alive your account or similar things.

Then I found

d y n d n s DOT it ... written this way so you will not think I'm spamming :-)

Seems there are no caveats like those said before, and they have a page detailing the update protocol, seems it could be easy to modify the script
http://wiki.mikrotik.com/wiki/Dynamic_D ... behind_NAT
to support that provider...

Is anybody using their service? Maybe someone has another ddns provider to suggest?
 
efaden
Forum Guru
Forum Guru
Posts: 1708
Joined: Sat Mar 30, 2013 1:55 am
Location: New York, USA

Re: free dynamic dns ?

Mon Feb 10, 2014 10:06 pm

Hi, looking for a free dynamic dns I found that many providers are not free anymore, or have caveats in their free versions, like you need to log manually to keep alive your account or similar things.

Then I found

d y n d n s DOT it ... written this way so you will not think I'm spamming :-)

Seems there are no caveats like those said before, and they have a page detailing the update protocol, seems it could be easy to modify the script
http://wiki.mikrotik.com/wiki/Dynamic_D ... behind_NAT
to support that provider...

Is anybody using their service? Maybe someone has another ddns provider to suggest?
EntryDNS.
 
User avatar
c0d3rSh3ll
Long time Member
Long time Member
Posts: 557
Joined: Mon Jul 25, 2011 9:42 pm
Location: [admin@Chile] >

Re: free dynamic dns ?

Mon Feb 10, 2014 10:23 pm

I use freedns. Is good and free until to 5 host.

Sent from my mobile phone using Tapatalk.
 
pgh321
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 58
Joined: Fri Jan 03, 2014 7:35 pm

Re: free dynamic dns ?

Tue Feb 11, 2014 7:26 pm

In the meanwhile I discovered that the site I linked has a caveat too... Something like expiring after 30 days without logging in , like similar services...

So, I'll stick with your suggestions... EntryDNS or freedns.afraid.org , I'll need to choose one and hope they won't disappear like other free services...
afraid has many domains, but most of them are "third-party", it could be safer to stay with "owned" domains, like mooo.com or chickenkiller.com...
 
pgh321
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 58
Joined: Fri Jan 03, 2014 7:35 pm

Re: free dynamic dns ?

Wed Feb 12, 2014 10:14 pm

How do you use entrydns?
Their website says you need to use a "PUT" http request, I've looked fetch tool and it uses only GET ...
 
efaden
Forum Guru
Forum Guru
Posts: 1708
Joined: Sat Mar 30, 2013 1:55 am
Location: New York, USA

Re: free dynamic dns ?

Wed Feb 12, 2014 11:55 pm

How do you use entrydns?
Their website says you need to use a "PUT" http request, I've looked fetch tool and it uses only GET ...
Get your code from their site... and then just do the following... this is written for 6.9 with error catching... if your doing it on earlier (like 6.0) then just ditch the :do and the on-error stuff. ... Fetch works just fine. I have it in a scheduled script.... its super easy since it will get your ip for you.

ros code

:do {
        /tool fetch url="https://entrydns.net/records/modify/<YOUR CODE>" \
            mode=https keep-result=no
    } on-error={
        $logError "EntryDNS: Failed Fetching URL"
    }
 
pgh321
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 58
Joined: Fri Jan 03, 2014 7:35 pm

Re: free dynamic dns ?

Fri Feb 14, 2014 9:46 pm

Ok, seems really simple!
Do you just run it every 5 minutes or something like that?

Don't you check if your ip has changed before updating it? Most scripts I've seen, like http://wiki.mikrotik.com/wiki/Dynamic_D ... behind_NAT , check if the external ip has changed before trying to update it.

I thought that most services would consider this as an abuse, but if entrydns has no policy regarding this, I agree this is way simpler!
 
efaden
Forum Guru
Forum Guru
Posts: 1708
Joined: Sat Mar 30, 2013 1:55 am
Location: New York, USA

Re: free dynamic dns ?

Sat Feb 15, 2014 12:11 am

Ok, seems really simple!
Do you just run it every 5 minutes or something like that?

Don't you check if your ip has changed before updating it? Most scripts I've seen, like http://wiki.mikrotik.com/wiki/Dynamic_D ... behind_NAT , check if the external ip has changed before trying to update it.

I thought that most services would consider this as an abuse, but if entrydns has no policy regarding this, I agree this is way simpler!
I'm running it minutely on several sites... haven't had a problem yet. You "could" write it to check the IP before updating... you want me to write one to do that?
 
efaden
Forum Guru
Forum Guru
Posts: 1708
Joined: Sat Mar 30, 2013 1:55 am
Location: New York, USA

Re: free dynamic dns ?

Sat Feb 15, 2014 12:16 am

Ok, seems really simple!
Do you just run it every 5 minutes or something like that?

Don't you check if your ip has changed before updating it? Most scripts I've seen, like http://wiki.mikrotik.com/wiki/Dynamic_D ... behind_NAT , check if the external ip has changed before trying to update it.

I thought that most services would consider this as an abuse, but if entrydns has no policy regarding this, I agree this is way simpler!
I'm running it minutely on several sites... haven't had a problem yet. You "could" write it to check the IP before updating... you want me to write one to do that?

Something Like This...

ros code

#
# Variables
#
:local EntryDNSAuthenticationTokens {}

:local currentLocalSiteInterface "ether01-gateway"
:local currentLocalSiteName ""
:local currentLocalSite ""

:local forceUpdate false

#
# Script
#
:global localSite 

:if ($currentLocalSiteInterface != "" && $currentLocalSite = "") do={
#	:set currentLocalSite [/ip address get [/ip address find interface=$currentLocalSiteInterface] address]
	:set currentLocalSite [/ip dhcp-client get [/ip dhcp-client find interface=$currentLocalSiteInterface] address]
	:set currentLocalSite [:pick $currentLocalSite 0 [:find $currentLocalSite "/" -1]]
}

:if ($currentLocalSiteName != "" && $currentLocalSite = "") do={
	:set currentLocalSite [:resolve $currentLocalSiteName]  
}

:if ($currentLocalSite = "") do={
	/tool fetch url="http://myip.dnsomatic.com/" mode=http dst-path=mypublicip.txt
	:set currentLocalSite [/file get mypublicip.txt contents]
	/file remove [/file find name="mypublicip.txt"]
}

:if ([:typeof $localSite] = "nothing") do={
	:set localSite ""
}

:if ($currentLocalSite != $localSite) do={
	:set forceUpdate true
	:set localSite $currentLocalSite
}


:if ($forceUpdate) do={
	:foreach i in $EntryDNSAuthenticationTokens do={
		:do {
			/tool fetch url="https://entrydns.net/records/modify/$i" \ 
				mode=https keep-result=no
		} on-error={
			:log error ("EntryDNS: Failed Updating - \"" . $i "\"")
		}
	}
}
 
pgh321
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 58
Joined: Fri Jan 03, 2014 7:35 pm

Re: free dynamic dns ?

Sat Feb 15, 2014 11:48 am

Really nice script, thank you...
Anyway, if this is not a problem for entrydns, I have no problems just updating every 5 minutes :-)

Regarding your script, just a question: LocalSite is global because you need to still have it at the next script run, am I correct?

I tried, as an exercise, to modify your code since I'm behind nat , only one entrydns host, and I don't have other usage cases...
Obviously, you are much more skilled than me, I just tried to learn something tweaking your script, this is not to "criticize" it :-)
Can you tell me if my simplified script below would work correctly?
Thank you again

ros code

# Variables
:local EntryDNSAuthToken "INSERT_TOKEN_HERE"
:local EntryDNSForceUpdate false
:local currentIP ""
:global previousIP

# Script

/tool fetch url="http://myip.dnsomatic.com/" mode=http dst-path="/publicip.txt"
:set currentIP [/file get "/publicip.txt" contents]
/file remove "/publicip.txt"

:if ([:typeof $previousIP] = "nothing") do={ :set previousIP "" }

:if ($currentIP != $previousIP) do={
:set EntryDNSForceUpdate true
:set previousIP $currentIP
}

:if ($EntryDNSForceUpdate) do={
/tool fetch url="https://entrydns.net/records/modify/$EntryDNSAuthToken" mode=https keep-result=no
} on-error={ :log error ("EntryDNS: Failed Updating") }
 
efaden
Forum Guru
Forum Guru
Posts: 1708
Joined: Sat Mar 30, 2013 1:55 am
Location: New York, USA

Re: free dynamic dns ?

Sat Feb 15, 2014 2:42 pm

Really nice script, thank you...
Anyway, if this is not a problem for entrydns, I have no problems just updating every 5 minutes :-)

Regarding your script, just a question: LocalSite is global because you need to still have it at the next script run, am I correct?

I tried, as an exercise, to modify your code since I'm behind nat , only one entrydns host, and I don't have other usage cases...
Obviously, you are much more skilled than me, I just tried to learn something tweaking your script, this is not to "criticize" it :-)
Can you tell me if my simplified script below would work correctly?
Thank you again

ros code

# Variables
:local EntryDNSAuthToken "INSERT_TOKEN_HERE"
:local EntryDNSForceUpdate false
:local currentIP ""
:global previousIP

# Script

/tool fetch url="http://myip.dnsomatic.com/" mode=http dst-path="/publicip.txt"
:set currentIP [/file get "/publicip.txt" contents]
/file remove "/publicip.txt"

:if ([:typeof $previousIP] = "nothing") do={ :set previousIP "" }

:if ($currentIP != $previousIP) do={
:set EntryDNSForceUpdate true
:set previousIP $currentIP
}

:if ($EntryDNSForceUpdate) do={
/tool fetch url="https://entrydns.net/records/modify/$EntryDNSAuthToken" mode=https keep-result=no
} on-error={ :log error ("EntryDNS: Failed Updating") }

Feel free to tweak away. And it looks right to me.

You may also need to change

ros code

:if ([:typeof $previousIP] = "nothing") do={ :set previousIP "" }
There were a couple of versions where it would have been "nil" instead of "nothing"... I forget which though. It was like 6.4 to 6.7 or something.

EDIT: And yes... thats why the one variable is a global.

-Eric
 
freemannnn
Forum Veteran
Forum Veteran
Posts: 700
Joined: Sun Oct 13, 2013 7:29 pm

Re: free dynamic dns ?

Mon Apr 21, 2014 9:59 pm

i cannot make above scripts to work in ros 6.12.
can someone post a simple script to update entrydns.
 
efaden
Forum Guru
Forum Guru
Posts: 1708
Joined: Sat Mar 30, 2013 1:55 am
Location: New York, USA

Re: free dynamic dns ?

Mon Apr 21, 2014 10:59 pm

i cannot make above scripts to work in ros 6.12.
can someone post a simple script to update entrydns.
I'm currently running it in 6.12. What problem are you having?
 
freemannnn
Forum Veteran
Forum Veteran
Posts: 700
Joined: Sun Oct 13, 2013 7:29 pm

Re: free dynamic dns ?

Mon Apr 21, 2014 11:41 pm

Does not update. Can you give me the exact code to put in the script.
I tried setting with my token but it does not update
 
efaden
Forum Guru
Forum Guru
Posts: 1708
Joined: Sat Mar 30, 2013 1:55 am
Location: New York, USA

Re: free dynamic dns ?

Tue Apr 22, 2014 1:15 am

Does not update. Can you give me the exact code to put in the script.
I tried setting with my token but it does not update
What do you mean the exact code. I'm using that script with my token in it.

-Eric
 
freemannnn
Forum Veteran
Forum Veteran
Posts: 700
Joined: Sun Oct 13, 2013 7:29 pm

Re: free dynamic dns ?

Tue Apr 22, 2014 8:03 am

which script of all above? i tried all of them and none worked for me.
can you copy paste your script here.
 
freemannnn
Forum Veteran
Forum Veteran
Posts: 700
Joined: Sun Oct 13, 2013 7:29 pm

Re: free dynamic dns ?

Tue Apr 22, 2014 7:11 pm

i am using this script.
is there a line that i should put my dialup pppoe interface? my ip interface that i want is "pppoe-out1"
of course i put my token in the place "INSERT_TOKEN_HERE"

# Variables
:local EntryDNSAuthToken "MBAtxxxxxxx_xxxxxxx"
:local EntryDNSForceUpdate false
:local currentIP ""
:global previousIP
 
# Script
 
/tool fetch url="http://myip.dnsomatic.com/" mode=http dst-path="/publicip.txt"
:set currentIP [/file get "/publicip.txt" contents]
/file remove "/publicip.txt"
 
:if ([:typeof $previousIP] = "nothing") do={ :set previousIP "" }
 
:if ($currentIP != $previousIP) do={
:set EntryDNSForceUpdate true
:set previousIP $currentIP
}
 
:if ($EntryDNSForceUpdate) do={
/tool fetch url="https://entrydns.net/records/modify/$EntryDNSAuthToken" mode=https keep-result=no
} on-error={ :log error ("EntryDNS: Failed Updating") }
 
efaden
Forum Guru
Forum Guru
Posts: 1708
Joined: Sat Mar 30, 2013 1:55 am
Location: New York, USA

Re: free dynamic dns ?

Tue Apr 22, 2014 8:21 pm

i am using this script.
is there a line that i should put my dialup pppoe interface? my ip interface that i want is "pppoe-out1"
of course i put my token in the place "INSERT_TOKEN_HERE"

# Variables
:local EntryDNSAuthToken "MBAtxxxxxxx_xxxxxxx"
:local EntryDNSForceUpdate false
:local currentIP ""
:global previousIP
 
# Script
 
/tool fetch url="http://myip.dnsomatic.com/" mode=http dst-path="/publicip.txt"
:set currentIP [/file get "/publicip.txt" contents]
/file remove "/publicip.txt"
 
:if ([:typeof $previousIP] = "nothing") do={ :set previousIP "" }
 
:if ($currentIP != $previousIP) do={
:set EntryDNSForceUpdate true
:set previousIP $currentIP
}
 
:if ($EntryDNSForceUpdate) do={
/tool fetch url="https://entrydns.net/records/modify/$EntryDNSAuthToken" mode=https keep-result=no
} on-error={ :log error ("EntryDNS: Failed Updating") }
Because the script is wrong. Look at the one I posted....

ros code

# Variables
:local EntryDNSAuthToken "MBAtxxxxxxx_xxxxxxx"
:local EntryDNSForceUpdate false
:local currentIP ""
:global previousIP
 
# Script
 
/tool fetch url="http://myip.dnsomatic.com/" mode=http dst-path="/publicip.txt"
:set currentIP [/file get "/publicip.txt" contents]
/file remove "/publicip.txt"
 
:if ([:typeof $previousIP] = "nothing") do={ :set previousIP "" }
 
:if ($currentIP != $previousIP) do={
  :set EntryDNSForceUpdate true
  :set previousIP $currentIP
}
 
:if ($EntryDNSForceUpdate) do={
  :do {
    /tool fetch url="https://entrydns.net/records/modify/$EntryDNSAuthToken" mode=https keep-result=no
   } on-error={ 
     :log error ("EntryDNS: Failed Updating")
   }
}
Specifically the on-error block was messed up.
 
freemannnn
Forum Veteran
Forum Veteran
Posts: 700
Joined: Sun Oct 13, 2013 7:29 pm

Re: free dynamic dns ?

Tue Apr 22, 2014 8:48 pm

still nothing.
please can you paste a script here with my credentials so i just copy and paste it. i feel stupid that i cannot do it. is it so difficult?
my interface is "pppoe-out1"
my token is "MBAtrFK9dAs5_YJrMDEe"
 
pgh321
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 58
Joined: Fri Jan 03, 2014 7:35 pm

Re: free dynamic dns ?

Thu Jan 01, 2015 12:59 pm

Hi, sorry for the long delay...
I've understood my error, inadvertently I merged the "do" from the if block and the "do" of the on-error block, thank you :-)
Am I right now? BTW I added logging of the current IP, can you tell me if this is correct?
:if ($EntryDNSForceUpdate) do={
	:do {
		/tool fetch url="https://entrydns.net/records/modify/$EntryDNSAuthToken" mode=https keep-result=no
		:log info "EntryDNS: IP $currentIP"
		}
	on-error={ :log error "EntryDNS: Failed Updating" }
}
EDIT: freemannnn , regarding your question, try to use the script, inserting your token and changing only the last block with this posted here. The interface is (at least imho) not required since entrydns detects your EXTERNAL ip , it doesn't need to know your network structure.