I have couple of servers and a client and a DNS server running bind9. All are running Ubuntu 18.04 in virtual machines.
I want to make changes to the DNS forward zone file to make a change for the IP addresses of one of the servers. After the change in the DNS server I run:
sudo systemctl restart bind9
Then in the client, I clear the history and files from the browser. Then I also flush the DNS using this command:
sudo /etc/init.d/networking restart
But when I visit the server that I just changed its IP in the DNS, the client still sees the old IP content in the browser. i.e. the DNS seems to resolve to the old IP (which is an active server).
But when I restart both the client and DNS server, the resolution gets updated and the server resolves to the new IP and the client gets the page I assume.
It seems to me there is something not refreshing the DNS zone file changes immediately. Note that I update the serial before saving the zone file.
There are some other values which I do not know if they are causing delay in making changes effective?
These are the values at the beginning of the forward zone file:
;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA ns222.com. boss.com. (
9 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;