How do I flush the local DNS cache?

Asked by LEGOManiac

I'm having DNS issues with a server I'm trying to set up and I want to be absolutely sure that the Ubuntu 9.04 isn't using a locally cached address and is, indeed, getting it's information from the server.

How do I ensure that the local DNS cache has been flushed?

The problem BTW. is that I"m trying to block the workstations from downloading ads from doubleclick.net and doubleclick.com by putting an entry into the DNS server that says I"m authoritative for those domains and the IP is the server's IP so that no ad gets served. This has worked gread on my Windows server, but I"m having problems getting it to work on an eBox server under Ubuntu.

nslookup www.doubleclick.net says that the address is 192.168.0.201 (my server) yet my workstation can still access the site, which is why I think the IP has been cached.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Bhavani Shankar
Solved:
Last query:
Last reply:
Revision history for this message
Bhavani Shankar (bhavi) said :
#1

Install nscd using the following command

sudo aptitude install nscd

Flush DNS Cache using the following command

sudo /etc/init.d/nscd restart

Regards

Revision history for this message
Best Bhavani Shankar (bhavi) said :
#2

or

sudo /etc/init.d/networking restart

Revision history for this message
LEGOManiac (bzflaglegomaniac) said :
#3

Thanks Bhavani Shankar, that solved my question.