LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-14-2012, 09:31 AM   #1
michibahn
LQ Newbie
 
Registered: Sep 2012
Posts: 15

Rep: Reputation: Disabled
Setup internal DNS server in CENTOS


Hi guys.. I'm new to the forum and hoping to seek some help in my issue.

I've setup an internal DNS server using the CENTOS flavor and the problem is the local computers cannot resolve the hosts in the CENTOS DNS server.

here's my zone:


$ORIGIN vls.local.
$TTL 86400
@ IN SOA ns1.vls.local. hostmaster.vls.local. (
2001062501 ; serial
21600 ;refresh after 6 hours
3600 ;retry after 1 hour
604800 ;expire after 1 week
86400 ) ;minimum TTL 1 day
IN NS ns1.vls.local.
IN MX 10 mail.vls.local.
IN A 10.0.0.88
ns1 IN A 10.0.0.88
machine IN A 10.0.0.88
ftp IN A 10.0.0.88
mail IN CNAME machine
www IN CNAME machine

Everything resolves in the DNS server but if I use my client computer, it cannot.

Appreciate your help in advance.

Thanks!
 
Old 09-14-2012, 09:37 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
You'd need to provide more detail. Is this BIND? DNSMASQ? Something else?

For BIND what is in named.conf? If not BIND what config files?

Are you running iptables and/or a firewall device between the DNS server and the client? If so have you opened port 53?

On the clients what is in /etc/resolv.conf? /etc/nsswitch.conf?
 
Old 09-14-2012, 09:44 AM   #3
michibahn
LQ Newbie
 
Registered: Sep 2012
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by MensaWater View Post
You'd need to provide more detail. Is this BIND? DNSMASQ? Something else?

For BIND what is in named.conf? If not BIND what config files?

Are you running iptables and/or a firewall device between the DNS server and the client? If so have you opened port 53?

On the clients what is in /etc/resolv.conf? /etc/nsswitch.conf?
hi thanks for the reply.

i'm using BIND on the CENTOS and here is the named.conf

=================================
options {
listen-on port 53 { 10.0.0.88; };
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query { localhost; };
recursion yes;

dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;

/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";

managed-keys-directory "/var/named/dynamic";
};

logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};

zone "vls.local" IN {
type master;
file "vls.local.zone";
allow-update { none; };
};

zone "0.0.10.in-addr.arpa" IN {
type master;
file "vls.local.rr.zone";
allow-update { none; };
};

zone "." IN {
type hint;
file "named.ca";
};

include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
======================

this is the resolv.conf in the CENTOS server

========
search vls.local
nameserver 10.0.0.88
=============

my test client is a windows 7 desktop and no firewall between the CENTOS server and win7 desktop. i've even disabled the firewall in the CENTOS server.

on the win7 client, the dns server configured is 10.0.0.88

thanks!
 
Old 09-15-2012, 09:51 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

Remove or comment out
Quote:
allow-query { localhost; };
Regards
 
Old 09-17-2012, 06:23 AM   #5
michibahn
LQ Newbie
 
Registered: Sep 2012
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
Hi,

Remove or comment out

Regards
hi bathory.. this did the trick for a while but after a few minutes, the hostname of the DNS server is not accessible again from the win7 desktop. any ideas? thanks!
 
Old 09-17-2012, 07:44 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
hi bathory.. this did the trick for a while but after a few minutes, the hostname of the DNS server is not accessible again from the win7 desktop. any ideas? thanks!
What you mean by hostname? The FQDN (ns1.vls.local), or just the hostname (ns1)?
What is the output of:
Code:
nslookup ns1.vls.local 10.0.0.88
from the win7 client?
The only thing that comes in mind, is that your win7 box gets its network connection by a dhcp server that overwrites the dns IP settings.

Regards
 
Old 09-17-2012, 07:49 AM   #7
michibahn
LQ Newbie
 
Registered: Sep 2012
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
What you mean by hostname? The FQDN (ns1.vls.local), or just the hostname (ns1)?
What is the output of:
Code:
nslookup ns1.vls.local 10.0.0.88
from the win7 client?
The only thing that comes in mind, is that your win7 box gets its network connection by a dhcp server that overwrites the dns IP settings.

Regards
i'm trying to ping ns1.vls.local and all the A records in the zone but i'm not getting any reply.

my win7 client has static ip and everything is set manually even the dns ip.
 
Old 09-17-2012, 09:28 AM   #8
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
i'm trying to ping ns1.vls.local and all the A records in the zone but i'm not getting any reply.

my win7 client has static ip and everything is set manually even the dns ip.
Getting no reply from ping means nothing. Could be a firewall or something like that, that blocks icmp packets.
Does your win7 box resolve correctly the hosts you're trying to ping?
Run the nslookup command above and post the complete output.
 
Old 09-17-2012, 09:35 AM   #9
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
From the Windows 7 client's CMD window run "telnet <dnsserver> 53" to see if you can get to port 53 of the DNS server.

Note that by default Windows 7 has telnet client (and server) disabled. You can enable it by going to:

Start

Control Panel

Programs And Features

Turn Windows features on or off

Check Telnet Client

Hit OK

After that you can start Telnet via Command Prompt.

You may need to close the CMD window and reopen to get telnet
command line to start working.

Note this only enables the client to give you access to the command line. It does not activate the server so no one will have telnet access to your Win 7 box. Telnet is a good command to verify you can get to a specific server/port combination.
 
Old 09-17-2012, 09:36 AM   #10
michibahn
LQ Newbie
 
Registered: Sep 2012
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
Getting no reply from ping means nothing. Could be a firewall or something like that, that blocks icmp packets.
Does your win7 box resolve correctly the hosts you're trying to ping?
Run the nslookup command above and post the complete output.
i have turned off the win7 client firewall and on the centos server. i can resolve the hosts on the dns server using nslookup but the think is if i browse www.vls.local from the win7 client.. i get "page cannot be displayed" i'am sure that the default page is running on 10.0.0.88 because if i use http://10.0.0.88 on the win7 client, it displays the website.
 
Old 09-17-2012, 09:41 AM   #11
michibahn
LQ Newbie
 
Registered: Sep 2012
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by MensaWater View Post
From the Windows 7 client's CMD window run "telnet <dnsserver> 53" to see if you can get to port 53 of the DNS server.

Note that by default Windows 7 has telnet client (and server) disabled. You can enable it by going to:

Start

Control Panel

Programs And Features

Turn Windows features on or off

Check Telnet Client

Hit OK

After that you can start Telnet via Command Prompt.

You may need to close the CMD window and reopen to get telnet
command line to start working.

Note this only enables the client to give you access to the command line. It does not activate the server so no one will have telnet access to your Win 7 box. Telnet is a good command to verify you can get to a specific server/port combination.
hi.. whenever i telnet to the dns server it connects and give me a blank screen.. i'm assuming that it connects to the dns server? thanks!
 
Old 09-17-2012, 09:54 AM   #12
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Telnet tests connectivity using tcp protocol, while dns uses primarily udp.
So once again, run nslookup and post the results.
 
Old 09-17-2012, 10:06 AM   #13
michibahn
LQ Newbie
 
Registered: Sep 2012
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
Telnet tests connectivity using tcp protocol, while dns uses primarily udp.
So once again, run nslookup and post the results.
here's the output:

C:\Users\allan>nslookup www.vls.local 10.0.0.88
Server: machine.vls.local
Address: 10.0.0.88

Name: machine.vls.local
Address: 10.0.0.88
Aliases: www.vls.local

but like I said when I browse www.vls.local the page in not showing up.
 
Old 09-17-2012, 10:19 AM   #14
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
DNS uses both udp and tcp. If you can get to tcp its a good bet you can get to udp. (That is it isn't uncommon to see port 53 blocked but it IS uncommon to see TCP port 53 open without UDP port 53 also being open.) A blank screen rather than a timeout indicates you did connect. You hit Ctrl and the right square bracket "]" to get telnet command line and type "close" to exit the telnet connection.

Notice that your command tells you both which name server responded:

Code:
Server: machine.vls.local
Address: 10.0.0.88

And the response it gave:

Code:
Name: machine.vls.local
Address: 10.0.0.88
Aliases: www.vls.local
What happens if you try only:
nslookup www.vls.local

Specifically which SERVER does it say responded?

In your command you specified the server to try the lookup on it may be that it isn't finding the server that is your problem.

If you DO get the response from the the right server with the right address from the above nslookup without specifying server then it means your issue is in the Web setup NOT the DNS setup.

Last edited by MensaWater; 09-17-2012 at 10:21 AM.
 
Old 09-17-2012, 10:24 AM   #15
michibahn
LQ Newbie
 
Registered: Sep 2012
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by MensaWater View Post
DNS uses both udp and tcp. If you can get to tcp its a good bet you can get to udp. (That is it isn't uncommon to see port 53 blocked but it IS uncommon to see TCP port 53 open without UDP port 53 also being open.) A blank screen rather than a timeout indicates you did connect. You hit Ctrl and the right square bracket "]" to get telnet command line and type "close" to exit the telnet connection.

Notice that your command tells you both which name server responded:

Code:
Server: machine.vls.local
Address: 10.0.0.88

And the response it gave:

Code:
Name: machine.vls.local
Address: 10.0.0.88
Aliases: www.vls.local
What happens if you try only:
nslookup www.vls.local

Specifically which SERVER does it say responded?

In your command you specified the server to try the lookup on it may be that it isn't finding the server that is your problem.

If you DO get the response from the the right server with the right address from the above nslookup without specifying server then it means your issue is in the Web setup NOT the DNS setup.
I get the same result if I do nslookup www.vls.local only

I can't do ftp using ftp.vls.local aside from the web problem. I'm really stuck..
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Please help complete setup DNS in centos 5.6 splinux Linux - Server 7 07-09-2011 02:40 PM
LXer: CentOS 4.6 Server Setup: LAMP, Email, DNS, FTP, ISPConfig LXer Syndicated Linux News 0 01-10-2008 03:40 PM
LXer: CentOS 5.1 Server Setup: LAMP, Email, DNS, FTP, ISPConfig LXer Syndicated Linux News 0 12-06-2007 03:21 PM
CentOS DNS fails on internal network (works on server) ucffool Linux - Networking 1 05-31-2007 02:36 PM
Setup Internal DNS Server loufeliz Linux - Networking 1 01-28-2005 01:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration