MilesWeb Hosting Forum

Please login or register.

Login with username, password and session length



SMF - Just Installed!

Author Topic: How to flush DNS cache on Linux ?  (Read 12038 times)

0 Members and 1 Guest are viewing this topic.

Offline whackowebmaster

  • Newbie
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
How to flush DNS cache on Linux ?
« on: February 14, 2014, 12:16:12 AM »
Hi All,

My first post on this forum to educate Linux users  :P

Nscd is a daemon that provides a cache for the most common name service requests. The default configuration file, /etc/nscd.conf, determines the behavior of the cache daemon. There are two caches for each database: a positive one for items found, and a negative one for items not found.  Each cache has a separate TTL (time-to-live) period for its data.  Note that the shadow  file  is  specifically  not  cached.  getspnam(3)  calls  remain uncached as a result.  As a result of this behavior it is not possible to change non-nscd user to another non-nscd user via su service when nscd is running.

You can flush your DNS cache on Linux with commands below.

1. Login to your server via SSH.

2. Restart the nscd service with command

root@home [/]# /etc/init.d/nscd restart

Not all the Linux OS comes with nscd service pre installed. You will have to use yum OR apt-get depending on the distros to install it. Install nscd-2.12-1.132 rpm for the nscd service.

MilesWeb Hosting Forum

How to flush DNS cache on Linux ?
« on: February 14, 2014, 12:16:12 AM »