-->
Page 1 of 1

DuckDNS.org Dynamic DNS updater

PostPosted: Mon Nov 16, 2015 6:08 am
by kieranc
DuckDNS.org allow you to update your IP by requesting "https://duckdns.org/update/exampledomain/yourtoken", it also works via HTTP so I've used this to create a simple updater for the ESP8266. Hope someone else finds it useful.

Code: Select alldr=net.createConnection(net.TCP, 0)
dr:dns("www.duckdns.org",function(conn,ip)
myip=ip
end)
conn=net.createConnection(net.TCP, 0)
conn:on("receive", function(conn, payload) print(payload) end)
conn:connect(80,myip)
conn:send("GET /update/your-domain-here/your-token-goes-here HTTP/1.1\r\n")
conn:send("Host: www.duckdns.org\r\n")
conn:send("Accept: */*\r\n")
conn:send("User-Agent: Mozilla/4.0 (compatible; esp8266 Lua; Windows NT 5.1)\r\n")
conn:send("\r\n")


Since conn:connect only seem to work with an IP address, the first part resolves the IP for duckdns.org, then creates the http request.
The IP address for the update is determined automatically by DuckDNS, you can also specify it manually as a 3rd argument to the http request if you like.

Re: DuckDNS.org Dynamic DNS updater

PostPosted: Sat Dec 17, 2016 10:02 am
by Varcon
This is exactly what i am lookin for, but in Arduino IDE.
Can somebody help me? I have ESP in Station mode connected to my wifi network, now i just need to update my DuckDDNS, how to do this in Arduino IDE?

Re: DuckDNS.org Dynamic DNS updater

PostPosted: Sun Dec 25, 2016 11:37 am
by ywar2
Hello, here I have an another solution. If you want to try, my little server is online for few days. Support manual update from the browser and automatic update. No password required. Sorry for my bad English.
Constantin

http://yo7fws.blogspot.ro/2016/12/retea ... p8266.html

Re: DuckDNS.org Dynamic DNS updater

PostPosted: Sat Oct 05, 2019 10:48 pm
by josmaroal
Hola amigo, me interesa mucho tu aporte por favor podrias darme indicaciones como instalarlo en mi programa, estoy trabajando en ESP-12 con ESPBasic, pero si tengo que aprender el lenguaje que usas, ayudame.
Saludos y gracias .
Jose