Community discussions

MUM Europe 2020
 
User avatar
vetusa2
Member Candidate
Member Candidate
Topic Author
Posts: 122
Joined: Sat Jun 18, 2011 8:24 pm

problem "checkip.dyndns.org detect local ip"

Fri Mar 02, 2012 6:24 am

suddenly my dnsomatic stopped working 2 days ago,as i investigated the issue i found that the script depending on dnsomatic to update opendns failed for some reasons one of them is because of the line checkip.dyndns.org requests

checkip.dyndns.org shows local ip instead of the public ip

i need an advise regarding this issue
 
Zebble
newbie
Posts: 45
Joined: Mon Oct 17, 2011 4:07 am

Re: problem "checkip.dyndns.org detect local ip"

Mon Mar 05, 2012 10:56 pm

That possibly means your MikroTik is behind another NAT device.
 
CyberT
Member Candidate
Member Candidate
Posts: 172
Joined: Tue Feb 01, 2011 1:39 pm
Location: Johannesburg, South Africa
Contact:

Re: problem "checkip.dyndns.org detect local ip"

Mon Mar 12, 2012 10:01 am

you want to post the script so that we can have a look?
If this helped you then please slam that Karma button :-)
 
User avatar
vetusa2
Member Candidate
Member Candidate
Topic Author
Posts: 122
Joined: Sat Jun 18, 2011 8:24 pm

Re: problem "checkip.dyndns.org detect local ip"

Thu Mar 15, 2012 6:31 pm

the script is correct which is

# DNSoMatic automatic DNS updates
# User account info of DNSoMatic
:global maticuser "user"
:global maticpass "password"
:global matichost "Yourhost"
# No more changes need

:global previousIP

# Print values for debug
:log info "DNSoMatic: Updating dynamic IP on DNS for host $matichost"
:log info "DNSoMatic: User $maticuser y Pass $maticpass"
:log info "DNSoMatic: Last IP $previousIP"

# get the current IP address from the internet (in case of double-nat)
/tool fetch mode=http address="checkip.dyndns.org" src-path="/" dst-path="/dyndns.checkip.html"
:local result [/file get dyndns.checkip.html contents]

# parse the current IP result
:local resultLen [:len $result]
:local startLoc [:find $result ": " -1]
:set startLoc ($startLoc + 2)
:local endLoc [:find $result "</body>" -1]
:global currentIP [:pick $result $startLoc $endLoc]
:log info "DNSoMatic: IP actual $currentIP"

# Touching the string passed to fetch command on "src-path" option
:local str "/nic/update?hostname=$matichost&myip=$currentIP&wildcard=NOCHG&mx=NOCHG&backmx=NOCHG"

:if ($currentIP != $previousIP) do={
:log info "DNSoMatic: Update need"
:set previousIP $currentIP
:log info "DNSoMatic: Sending update $currentIP"
:log info [ :put [/tool fetch host=MT user=$maticuser password=$maticpass mode=http address="updates.dnsomatic.com" src-path=$str dst-path=$matichost]]
:log info "DNSoMatic: Host $matichost updated on DNSoMatic with IP $currentIP"
} else={
:log info "DNSoMatic: Previous IP $previousIP and current $currentIP equal, no update need"
}


when i open my mikrotik log i get a strange message

it say that my previous and current ip are equal but when i log into dnsomatic website my current or previous ip doesn't show up and only a message "waiting for update"!!!
 
User avatar
vetusa2
Member Candidate
Member Candidate
Topic Author
Posts: 122
Joined: Sat Jun 18, 2011 8:24 pm

Re: problem "checkip.dyndns.org detect local ip"

Sat Mar 17, 2012 5:34 pm

what could be the problem guys?!

Who is online

Users browsing this forum: Bing [Bot] and 100 guests