Name resolution is only working from server side. Clients cannot resolve host names.

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Name resolution is only working from server side. Clients cannot resolve host names.
# 1  
Old 11-04-2012
Linux Name resolution is only working from server side. Clients cannot resolve host names.

Hi Folks,

Could anyone please point me to the right direction as I have spent so much time on this without luck. Smilie

I have installed Bind on my CentOS 5 server for internal network. The name resolution is working from the server itself only but not from the clients.

--------------
ping ip from server to client machine => OK
ping ip from client to server machine => OK

ping hostname from server to client machine => OK
ping hostname from client to server machine => unknown host
--------------

Server1 [cent3 - CentOS 5] = eth1 "10.0.1.101" Bind 9 installed on CentOS 5
Client1 [odd1 - Oracle Linux 6] = eth1 "10.0.1.101" Oracle Linux 6
Client2 [odd2 - Oracle Linux 6] = eth1 "10.0.1.102" Oracle Linux 6
------------

resolv.conf (Server cent3)

Code:
; generated by /sbin/dhclient-script
search simtafco.com
nameserver 10.0.1.100

------------

resolv.conf (Client1 odd1)

Code:
; generated by /sbin/dhclient-script
search simtafco.com
nameserver 10.0.1.100

------------

named.conf (Server cent3)

Code:
options {
listen-on { any; } ;
directory "/var/named"; // the default
version "Nope";
allow-recursion { any; };
};

zone "simtafco.com" in {
type master;
file "simtafco.com" ;
};

------------

zone file simtafco.com (Server cent3)

Code:
@ IN SOA cent3.simtafco.com. admin.simtafco.com. (
2010062801 ; Serial
10800 ; Refresh
3600 ; Expire
86400 ; Minimum
)

simtafco.com. IN NS cent3.simtafco.com.

simtafco.com. IN A 10.0.1.100
odd1.simtafco.com IN A 10.0.1.101
odd2.simtafco.com IN A 10.0.1.102

------------

Thank you.

Last edited by Scrutinizer; 11-04-2012 at 09:15 PM.. Reason: mistyped - code tags (mod)
# 2  
Old 11-04-2012
Hi, what does nsswitch.conf look like on the client?
# 3  
Old 11-05-2012
Thanks for looking into that. Here is the nsswitch.conf file from the client side:
-----------

Code:
#
# /etc/nsswitch.conf
#
# An example Name Service Switch config file. This file should be
# sorted with the most-used services at the beginning.
#
# The entry '[NOTFOUND=return]' means that the search for an
# entry should stop if the search in the previous entry turned
# up nothing. Note that if the search failed due to some other reason
# (like no NIS server responding) then the search continues with the
# next entry.
#
# Legal entries are:
#
#	nisplus or nis+		Use NIS+ (NIS version 3)
#	nis or yp		Use NIS (NIS version 2), also called YP
#	dns			Use DNS (Domain Name Service)
#	files			Use the local files
#	db			Use the local database (.db) files
#	compat			Use NIS on compat mode
#	hesiod			Use Hesiod for user lookups
#	[NOTFOUND=return]	Stop searching if not found so far
#

# To use db, put the "db" in front of "files" for entries you want to be
# looked up first in the databases
#
# Example:
#passwd:    db files nisplus nis
#shadow:    db files nisplus nis
#group:     db files nisplus nis

passwd:     files
shadow:     files
group:      files

#hosts:     db files nisplus nis dns
hosts:      files dns

# Example - obey only what nisplus tells us...
#services:   nisplus [NOTFOUND=return] files
#networks:   nisplus [NOTFOUND=return] files
#protocols:  nisplus [NOTFOUND=return] files
#rpc:        nisplus [NOTFOUND=return] files
#ethers:     nisplus [NOTFOUND=return] files
#netmasks:   nisplus [NOTFOUND=return] files     

bootparams: nisplus [NOTFOUND=return] files

ethers:     files
netmasks:   files
networks:   files
protocols:  files
rpc:        files
services:   files

netgroup:   nisplus

publickey:  nisplus

automount:  files nisplus
aliases:    files nisplus


Last edited by Scrutinizer; 11-05-2012 at 07:20 AM.. Reason: Changed icode to code tags
# 4  
Old 11-06-2012
There does not appear to be an A record for cent3.simtafco.com.. It could be that it works on the server itself, because it probably does have an entry in /etc/hosts
# 5  
Old 11-06-2012
Wrench

Thanks for your reply.

I think I will need to make sure that BIND configuration was fine. So going to re-install and configure to make sure I did not miss anything. Will post the results soon.
# 6  
Old 11-07-2012
You do not have to re-install things.
You can check your config file syntax by named-checkconf, to check zone file confignamed-checkzone zonename

Check if the port 53 (both udp and tcp) is open in the iptables (if it's set to on) or any external firewall sitting between the client and server.

Check if both the server and the client are on the same subnet, if not, make sure that routing is taking place properly.
# 7  
Old 11-09-2012
I had removed the bind packages by the time your message was posted. But this time I did not install the bind-chroot package and used the standard bind. However, I hit exactly the same issue. [can ping ip addresses in all directions but hostname ping only works from server]. So I checked the udp/tcp port 53 but did not find them in netstat -an. I issued the following commands as found in google and did /etc/init.d/iptables restart but no joy. So looks like this might be the issue why my clients cannot reach the dns server. Any ideas on how to open udp and tcp port 53 please (CentOS 5)?

Code:
iptables -A INPUT -p tcp -m tcp --sport 53 --dport 1024:65535 -m state --state ESTABLISHED -j ACCEPT
iptables -A INPUT -p udp -m udp --sport 53 --dport 1024:65535 -m state --state ESTABLISHED -j ACCEPT
iptables -A OUTPUT -p tcp -m tcp --sport 1024:65535 --dport 53 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A OUTPUT -p udp -m udp --sport 1024:65535 --dport 53 -m state --state NEW,ESTABLISHED -j ACCEPT

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Linux

My server can't resolve domains?

I am on a VPS that is pretty much unmanaged so it means im on my own. I did my best to configure it so i can host my own site for other people to see it online but seems like i have network problems because in the last days many of my users report they cant enter my site from my domain and... (7 Replies)
Discussion started by: supercain
7 Replies

2. Programming

Clients - Server ( UDP )

Hello, I have a question: I want to create a n client to one server connection. This is the client-server algorithm. Enybody help to make the changes? (0 Replies)
Discussion started by: MaHmur
0 Replies

3. UNIX for Advanced & Expert Users

host file : same ip with different names

Dear Unix experts My application runs on Linux. The host file has the same ip address in two differnt lines but with different names. For example 10.114.45.14 prod.xyz.com prodx 10.114.45.14 prod-int.xyz.com prodx-int Could you please let me know if it is right? What is the... (2 Replies)
Discussion started by: nathan_nathan
2 Replies

4. IP Networking

How to host apps for thin-clients for cheap on a home network?

Hello, I am planning to build a HP Proliant DL380 server w/ Debian. I would like to connect 6 or 8 thin clients (or zero-clients) to this server and host the applications for the thin clients. The thin-clients are all wireless LAN. All data created by users on the thin clients saved on the... (0 Replies)
Discussion started by: Marcus Aurelius
0 Replies

5. Web Development

Cannot access Apache web server from Wan side, only Lan side.

I have installed WAMPSERVER 2.0 on my windows vista x64 system but still am having issues with getting the webserver to be seen outside my local network. It is working fine within my local network. Been through several setup tutorials so far, no dice still. For testing purposes I have... (1 Reply)
Discussion started by: davidmanvell
1 Replies

6. Linux

resolve one IP on DNS server

Hi! I have a dns server (bind) with 2 zones forward and reverse and i need to resolve one ip completely different. I have add to /etc/hosts and i can ping but i can't do nslookup. I've tried to add the dns server responsible to resolve that ip on /etc/resolv.conf without success. So how can i... (2 Replies)
Discussion started by: BufferExploder
2 Replies

7. UNIX for Advanced & Expert Users

SUSE 9 and 10 NIS clients with RedHat 8.0 NIS server not working

We have a RedHat 8.0 NIS master, with a RedHat 8.0 NIS Slave. We also have a small number of SUSE 9.1 and SUSE 10 machines here for evaluation. However, no matter what i do, the SUSE machines will not talk to the NIS Servers. If i broadcast for NIS Servers for the specified NIS domain, it... (1 Reply)
Discussion started by: fishsponge
1 Replies

8. UNIX for Advanced & Expert Users

host alias not working: host not found

Hello, I am working on HP-UX , and in the /etc/hosts file we have setup an alias: aa.bb.cc.dd devmach2.unix.org devmach2 devma2v The alias devma2v does not work. Error when pinging devma2v ping: unknown host devma2v For devmach2 the ping works fine , returning the correct IP... (4 Replies)
Discussion started by: FunnyCats
4 Replies

9. Shell Programming and Scripting

Server side scripting

I have my webpage hosted on one unix server, and using the command <!--#exec cmd="./nUsers.sh"--> it calls the appropriate script to tell me how many people are on the unix server at that time. I need to be able to find out how many users are on another unix server without logging in but using the... (1 Reply)
Discussion started by: paladyn_2002
1 Replies

10. IP Networking

Cannot Resolve Host Name

I am running LexMark MarkNetPro-3 print servers on my AIX network. All of the sudden, none of my printers will print anymore. I am getting an error message on the console: Unable to resolve host name. This message comes up everytime a user submits a print job. Any Ideas? (1 Reply)
Discussion started by: Docboyeee
1 Replies
Login or Register to Ask a Question