Clara
08-24-2015, 06:36 PM
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:
But after I changed $ip in "update_dns.sh" and ran it again, `dig` gave me the following result:
Maybe this is because that "update_dns.sh" only adds the new ip but does 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.21But 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.171Maybe 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