Community discussions

MikroTik App
 
crtcji
just joined
Topic Author
Posts: 2
Joined: Fri Nov 17, 2017 2:29 pm

Dynamic DNS on Digital Ocean

Fri Nov 17, 2017 3:01 pm

Hello to everyone,
Digital Ocean offers a wonderful option to manage one's domains' DNS records. Though there is no official Dynamic DNS record in the control panel, there are workarounds to make it workable through their API.
I managed to use script https://gist.github.com/glpunk/8679208# ... nt-1383398 on a Linux box that updates my ISP's dynamic IP to the A record of a subdomain of my site.
#your domain ID
domain_id="XXX"
#subdomain
subdomain="XXX"
#record to update, must be numeric id (you can find this by inspecting HTML on the dns edit page)
record_id="XXX"
#your api key
api_key="XXX"

### don't change ###
ip="$(curl  http://ipecho.net/plain)"
echo content="$(curl -H "Authorization: Bearer $api_key" -H "Content-Type: application/json" \
                 -d '{"name": "'"$subdomain"'", "data": "'"$ip"'"}' \
                 -X PUT "https://api.digitalocean.com/v2/domains/$domain_id/records/$record_id")"
However I would like to use a in-house solution on the Mikrotik device that updates the IP. I happened to use a script http://mattdietz.net/posts/namecheap-dy ... rotik.html that updated the IP on the Mikrotik for Namecheap.com and it worked flawlessly. I tried to modify it, but due to the lack of knowledge I ended up with nothing workable.

Can someone point me into the right direction or maybe someone has already a viable solution?

Thank you.
 
BRMateus2
Frequent Visitor
Frequent Visitor
Posts: 70
Joined: Thu Oct 26, 2017 11:18 pm

Re: Dynamic DNS on Digital Ocean

Fri Nov 17, 2017 5:37 pm

I could not link your request directly to what you need, but there is the public DDNS offered by MikroTik itself, at IP->Cloud (supports only IPv4 as now).
There you can make Digital Ocean point to the link created by the MikroTik.

Disable Update Time if you already have a NTP Client setup.
 
crtcji
just joined
Topic Author
Posts: 2
Joined: Fri Nov 17, 2017 2:29 pm

Re: Dynamic DNS on Digital Ocean

Fri Nov 17, 2017 8:12 pm

Thank you. I am already using it but I wanted, and to be honest still desire to have a backup solution.
Any thoughts?
Someone?

Who is online

Users browsing this forum: Google [Bot], msatter, wbruns and 155 guests