HajarBos Community

HajarBos Community (https://www.hajarbos.com/)
-   About DNS (https://www.hajarbos.com/f21/)
-   -   How to Flush DNS in Linux (https://www.hajarbos.com/f21/how-flush-dns-linux-49444.html)

dendik 05-08-2012 08:20 PM

How to Flush DNS in Linux

In many builds of Linux the nscd daemon is used to manage the client DNS cache. For builds that use this method, restarting the nscd daemon is the primary means to flush DNS cache. Other builds of Linux may run BIND or dnsmasq as the primary name service.

Steps to Flush NSCD DNS Cache

NSCD is used to speed up consecutive access to the same data and improve overall system performance.

1. Enter “$sudo /etc/init.d/nscd restart and press the “enter” or “return” key.

2. Once nscd restarts the DNS will be flushed. Alternatively, you can enter “# service nscd restart.”

Steps to Flush DNSMASQ DNS Cache

DNMASQ is used as a lightweight DHCP, TFTP, and DNS server. It was primarily designed to provide DHCP and DNS services to a LAN, accepts DNS queries, and answers them. It is also installed on a number of routers to cache DNS queries or look-ups.

1. Enter “$ sudo /etc/init.d/dnsmasq restart”

2. Once dnsmasq restarts the DNS will be flushed.

Steps to Flush BIND Server DNS Cache

Similar to nscd and dnsmasq, to flush DNS cache in BIND simply requires a restart to clear the cache.

1. Enter “# /etc/init.d/named restart” followed by pressing the “enter” or “return” key.

2. Once BIND completes restart the DNS will be flushed.


All times are GMT +1. The time now is 11:22 AM.

Copyright © 2010 HajarBos Network