Flush caching BIND server DNS cache
A caching BIND server obtains information from another server (a Zone Master) in response to a host query and then saves (caches) the data locally. All you have to do is restart bind to clear its cache:
systemctl restart named
or
service named restart
or
/etc/init.d/named restart
You can also use rndc command as follows flush out all cache:
rndc restart
OR
rndc exec
BIND v9.3.0 and above will support flushing all of the records attached to a particular domain name with rndc flushname command. In this example flush all records releated to tutorialspots.com[/ domain:
rndc flushname tutorialspots.com
It is also possible to flush out BIND views. For example, lan and wan views can be flushed using the following command:
rndc flush lan
rndc flush wan
Other Method: change nameserver
Change file /etc/resolv.conf
# Generated by NetworkManager nameserver 8.8.8.8 nameserver 8.8.4.4
or
# Generated by NetworkManager nameserver 1.1.1.1 nameserver 1.0.0.1
Recent search terms:
- centos сбросить dns кэш
2 Comments
How to fix error can’t ping any hostname on Linux | Free Online Tutorials
(December 31, 2018 - 11:16 am)[…] But you can ping IP. So strange! How to fix this error? Simple, you only need flush DNS cache. You can read this artice: How to flush DNS cache on CentOS […]
How to flush DNS cache on Windows | Free Online Tutorials
(June 12, 2019 - 1:19 pm)[…] You also like: How to flush DNS cache on CentOS […]