free dynamic dns ?

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 :slight_smile:

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_DNS_Update_Script_for_dynDNS_behind_NAT
to support that provider…

Is anybody using their service? Maybe someone has another ddns provider to suggest?

EntryDNS.

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

Sent from my mobile phone using Tapatalk.

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

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.
:do {
/tool fetch url=“https://entrydns.net/records/modify/<YOUR CODE>”
mode=https keep-result=no
} on-error={
$logError “EntryDNS: Failed Fetching URL”
}

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_DNS_Update_Script_for_dynDNS_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…

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 “"”)
}
}
}

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

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 :slight_smile:
Can you tell me if my simplified script below would work correctly?
Thank you again

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
: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

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?

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

which script of all above? i tried all of them and none worked for me.
can you copy paste your script here.

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…

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.

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”

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 :slight_smile:
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.