Visit Our UNIX and Linux User Community

DNS flush is not working

Thread Tools Search this Thread
Homework and Emergencies Emergency UNIX and Linux Support DNS flush is not working
# 1  
Old 07-06-2012
DNS flush is not working

I have a Linux machine and it seems DNS cache is not getting clear on it. It is still showing old values, even after changing in DNS server by Network team. I did
/etc/init.d/nscd restart

But still it is showing old values on this server.
On my rest of servers in environment, nslookup is showing updated value, so problem is only with this server.
Please advice.
# 2  
Old 07-06-2012
Contrary to the misleading service name, nscd is not really a caching service for DNS. (It caches names resolved via services indicated via nsswitch.conf, including names in /etc/hosts.) First, tell us the "hosts:" entry in /etc/nsswitch.conf. Second, guve us your /etc/resolv.conf file. The first host entry in that file is the most likely origin of your bad DNS entries. If that IP *is* the same host, then tell us which service is running on port 53 ("netstat -anp | grep :53")
# 3  
Old 07-06-2012
Here is the required output -->
root@tldb4t01:~> cat /etc/nsswitch.conf | grep hosts
hosts:          files dns
root@tldb4t01:~> cat /etc/resolv.conf
root@tldb4t01:~> netstat -anp | grep :53
tcp        0      0*               LISTEN      54403/named
tcp        0      0*               LISTEN      54403/named
tcp        0      0*               LISTEN      54403/named
tcp        0      0  *               LISTEN      54403/named
tcp        0      0  *               LISTEN      54403/named
tcp        0      0         ESTABLISHED 24216/cvd
tcp        0      0         ESTABLISHED 24216/cvd
tcp        0      0 :::53                   :::*                    LISTEN      54403/named
udp        0      0*                           54403/named
udp        0      0*                           54403/named
udp        0      0*                           54403/named
udp        0      0  *                           54403/named
udp        0      0  *                           54403/named
udp        0      0 :::53                   :::*                                54403/named

# 4  
Old 07-06-2012
So I take it this server has one of the IPs listed in resolv.conf?

Assuming that is the case, the problem is that this host is a dns server running "named". Named can run in one (or more) of several modes :

1. DNS master - holds the master copy of all hosts and objects it resolves
2. DnS slave - holds a copy which it regularly fetches from the master
3. DNS resolver & cache - resolves and caches answers from anither DNS server - this is called "forwarding".

What is your intention for this service?
# 5  
Old 07-06-2012
This server is a client (Not DNS Server/Slave). Network team has made changes on DNS Server and DNS Slave, thats why when we do
PHP Code:
nslookup tldb4t-scan 
from any of other server in my environment, output is updated one. But only from this server, it is still showing old values.
Is this making things clear to you ?
# 6  
Old 07-06-2012
Remove this servers' IP addresses from resolv.conf, and further, stop and disable the named service on it. After this, your host will use only the master and slave DNS servers and so should always be accurate.

(If for some reason this presents a peformance issue, then we will look at creating a proper dns caching-resolver on this server.)
This User Gave Thanks to otheus For This Post:
# 7  
Old 07-06-2012
I am able to get it now. Thanks a lot

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

DNS client added to DNS server but not working

Hi, We have built a new server (RHEL VM)and added that IP/hostname into dns zone configs file on DNS server (Solaris 10). Reloaded the configuration using and added nameserver into resolv.conf on client. But when I am trying nslookup, its not getting resolved. The nameserver is not able to... (8 Replies)
Discussion started by: snchaudhari2
8 Replies

2. Proxy Server

IPtable rules for DNS/http/https traffic for specific hosts only, not working.

Hi there, I have a VPS and am working on a little side project for myself and friend which is a DNS proxy. Everything was great till recently. My VPS IP has been detected by some botnet or something, and I believe SMURF attacks are occuring. The VPS provider keeps shutting down my VPS... (3 Replies)
Discussion started by: phi0x
3 Replies

3. Shell Programming and Scripting

Command to flush specific domain in SunOS 5 DNS

Hello to all, May you help saying me how to flush a specific domain in Linux SunOS5 I know the command rndc is to flush DNS cache, but I would like to know: 1- How to do a flush only on specific domain 2- How to see the content of DNS Resolver cache (similar to info given by IPCONFIG... (2 Replies)
Discussion started by: Ophiuchus
2 Replies

4. Red Hat

Split DNS not working with Bind-9.7

Hi All, Distros of machines : RHEL6 Bind Vesrion : Bind-9.7-3.2 I am trying to set up a test DNS for my home network. I have two rhel 6 machines A and B. Machine A has 2 NICs and is acting as a router also, one NIC is facing intranet and the otehr is facing intranet. On machine A i have... (0 Replies)
Discussion started by: Rohit Bhanot
0 Replies

5. Red Hat

DNS not working

Hi, I have installed RHEL5 as a new build and need get it to resolve to the internet. At the moment I get following: # dig ; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5 <<>> ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status:... (9 Replies)
Discussion started by: Duffs22
9 Replies

6. Solaris

dns client not working

Hi All, I have configured linux server as local dns server (practice level). I have given the IP and hostname details in /etc/hosts -bash-3.00# cat /etc/hosts # # Internet host table # ::1 localhost localhost loghost #... (3 Replies)
Discussion started by: vaibhav.kanchan
3 Replies

7. UNIX for Dummies Questions & Answers

Secondary DNS not working

hi guys I am doing some testing for DNS I got a master DNS( and I setup a slave DNS( but when I shutdown the Master DNS my linux client cannot resolve using the slave any idea way? This is the named.conf options { query-source port 53; directory... (9 Replies)
Discussion started by: kopper
9 Replies

8. HP-UX

lp print flush

Dear frnds, i just migrated to hp_ux11i from digital unix, from my new system some printers not printing next day, what i mean is, in lpstat it shows printer is enabled but printing not happening. for that what i do u know, i just disable the lp and enable it again. then it would print. is there... (0 Replies)
Discussion started by: jestinabel
0 Replies

9. Solaris

OS Problems -no DNS & SSH not working

I just installed Solaris 6/10 without any problems but I didn't connect the network cable when I installed it. Here are my problems: -I can access webpages using IP addrsses but not with domain names -ssh is installed but it is not running ('ps -e | grep sshd' didn't show it) I have been... (4 Replies)
Discussion started by: kungpow
4 Replies

Featured Tech Videos