Technology and Beyond (TaB)

Full Version: Related to DDNS: ip not updated correctly
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

Clara

It seems that "./update_dns.sh" will add the new record correctly but do not remove the old one:

After changing "curl ifconfig.me" (this gave me an error) to "curl http://www.pkill.info/whoami/myip/" (as suggested in Eric's reply), I followed Amoner's instruction and `dig` worked correctly:
Code:
dig wretar.dthink.net @115.231.209.243
...
;; ANSWER SECTION:
wretar.dthink.net.    600    IN    A    119.63.98.21

But after I changed $ip in "update_dns.sh" and ran it again, `dig` gave me the following result:
Code:
;; ANSWER SECTION:
wretar.dthink.net.    600    IN    A    119.63.98.21
wretar.dthink.net.    600    IN    A    143.89.135.171

Maybe this is because that "update_dns.sh" only adds the new ip but does not remove the old one:
Code:
echo "update add $host 600 A $ip" >> dns_file

amoners

(08-24-2015 06:36 PM)Clara Wrote: [ -> ]It seems that "./update_dns.sh" will add the new record correctly but do not remove the old one:

After changing "curl ifconfig.me" (this gave me an error) to "curl http://www.pkill.info/whoami/myip/" (as suggested in Eric's reply), I followed Amoner's instruction and `dig` worked correctly:
Code:
dig wretar.dthink.net @115.231.209.243
...
;; ANSWER SECTION:
wretar.dthink.net.    600    IN    A    119.63.98.21

But after I changed $ip in "update_dns.sh" and ran it again, `dig` gave me the following result:
Code:
;; ANSWER SECTION:
wretar.dthink.net.    600    IN    A    119.63.98.21
wretar.dthink.net.    600    IN    A    143.89.135.171

Maybe this is because that "update_dns.sh" only adds the new ip but does not remove the old one:
Code:
echo "update add $host 600 A $ip" >> dns_file

Yes, It should delete exist record before update new one.

Fixed in commit ba6d54cb1674cfed31baf676b314a9474b5fa57d, please try again.

FYI: The usage is same as before, you need to change `curl` to get IP.

It may takes a few mins to effective.

Clara

(08-25-2015 12:24 AM)amoners Wrote: [ -> ]Yes, It should delete exist record before update new one.

Fixed in commit ba6d54cb1674cfed31baf676b314a9474b5fa57d, please try again.

FYI: The usage is same as before, you need to change `curl` to get IP.

It may takes a few mins to effective.

It works smoothly now.
Thank you!

amoners

(08-25-2015 09:47 AM)Clara Wrote: [ -> ]
(08-25-2015 12:24 AM)amoners Wrote: [ -> ]Yes, It should delete exist record before update new one.

Fixed in commit ba6d54cb1674cfed31baf676b314a9474b5fa57d, please try again.

FYI: The usage is same as before, you need to change `curl` to get IP.

It may takes a few mins to effective.

It works smoothly now.
Thank you!

Ok, Moved to 'Complete work'.
Reference URL's