LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-19-2012, 11:06 AM   #1
amr_salah944
LQ Newbie
 
Registered: Feb 2012
Posts: 20

Rep: Reputation: Disabled
DNS not working


Hello
I tried a lot of tutorials to set up a DNS server but I always fail , The DNS not resolving from any place including the local host too



# dig ns.domain.local
Code:
; <<>> DiG 9.7.3-P3-RedHat-9.7.3-8.P3.el6_2.2 <<>> ns.domain.local
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 54498
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;ns.domain.local.		IN	A

;; AUTHORITY SECTION:
.			7970	IN	SOA	a.root-servers.net. nstld.verisign-grs.com. 2012031900 1800 900 604800 86400

;; Query time: 14 msec
;; SERVER: 192.168.1.111#53(192.168.1.111)
;; WHEN: Mon Mar 19 17:59:11 2012
;; MSG SIZE  rcvd: 108
These are my configuration files :


# cat /var/named/chroot/etc/named.conf
Code:
options
{
	// Put files that named is allowed to write in the data/ directory:
	directory 		"/var/named";		// "Working" directory
	dump-file 		"data/cache_dump.db";
        statistics-file 	"data/named_stats.txt";
        memstatistics-file 	"data/named_mem_stats.txt";


	/*
	  Specify listenning interfaces. You can use list of addresses (';' is
	  delimiter) or keywords "any"/"none"
	*/
	//listen-on port 53	{ any; };
	listen-on port 53	{ 127.0.0.1; 192.168.1.0/24; };

	//listen-on-v6 port 53	{ any; };
	listen-on-v6 port 53	{ ::1; };

	/*
	  Access restrictions

	  There are two important options:
	    allow-query { argument; };
	      - allow queries for authoritative data

	    allow-query-cache { argument; };
	      - allow queries for non-authoritative data (mostly cached data)

	  You can use address, network address or keywords "any"/"localhost"/"none" as argument
	  Examples:
	    allow-query { localhost; 10.0.0.1; 192.168.1.0/8; };
	    allow-query-cache { ::1; fe80::5c63:a8ff:fe2f:4526; 10.0.0.1; };
	*/

	allow-query		{ localhost;  192.168.1.0/24; };
	allow-query-cache	{ localhost; };

	// Enable/disable recursion - recursion yes/no;
	recursion yes;

	/* DNSSEC related options. See information about keys ("Trusted keys", bellow) */

	/* Enable serving of DNSSEC related data - enable on both authoritative
 	   and recursive servers DNSSEC aware servers */
	dnssec-enable yes;

	/* Enable DNSSEC validation on recursive servers */
	dnssec-validation yes;

	/* Enable DLV by default, use built-in ISC DLV key. */
	dnssec-lookaside auto;
};

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






	zone "domain.local.zone" { 
		type master;
		file "my.internal.zone.db";
		allow-update { any; };
		allow-transfer { any; };
		allow-query { "any"; };
				};



cat /var/named/chroot/var/named/domain.local.zone
Code:
$TTL    3h
@       IN      SOA     nsdomain.local admin.domain.local. (
                          1        ; Serial
                          3h       ; Refresh after 3 hours
                          1h       ; Retry after 1 hour
                          1w       ; Expire after 1 week
                          1h )     ; Negative caching TTL of 1 day
;
@       IN      NS      ns.domain.local.
@       IN      NS      ns2.domain.local.


domain.local.    IN      MX      10      mail.domain.local.
domain.local.    IN      A       192.168.0.10
ns                     IN      A       192.168.0.111
ns2                     IN      A       192.168.0.11
;www                     IN      CNAME   domain.local.
mail                    IN      A       192.168.0.10
;ftp                     IN      CNAME   domain.local.

cat /etc/resolv.conf

Code:
nameserver 192.168.1.111

____________
any suggestions ?
 
Old 03-19-2012, 11:40 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
Your zone name as specified in named.conf and the zone itself is:
domain.local.zone

However, your dig is looking for records in a zone called:
domain.local

You can either:
Do your digs for records in domain.local.zone
--OR--
rename the zone as just domain.local in named.conf and the zone file.

To restate it; "zone" is not typically part of the zone name. Whatever you specify on the zone line is the zone name. Some people name the zone FILE with .zone which may be where your confusion was. You can name a zone FILE anything you want. (e.g. you could call it billbyob_is_my_friend so long as the file with that name exists with the zone information inside it.)
 
Old 03-19-2012, 01:13 PM   #3
Celyr
Member
 
Registered: Mar 2012
Location: Italy
Distribution: Slackware+Debian
Posts: 321

Rep: Reputation: 81
And always use named-checkconf and named-checkzone
They will help you
 
Old 03-19-2012, 01:32 PM   #4
amr_salah944
LQ Newbie
 
Registered: Feb 2012
Posts: 20

Original Poster
Rep: Reputation: Disabled
oh
Thank you all , that really helped me to overcome the current problem , but really IDK waht was the previous problems
Thnx again , I'll tell you when I get more problems
 
  


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
BIND - reverse dns queries only working locally, forward dns works fine. SloS13 Linux - Networking 3 08-25-2011 12:46 PM
DNS problems, reverse dns working localy but not on other servers. valls Linux - Newbie 1 06-16-2008 06:59 AM
DNS not working kalleanka Linux - Networking 4 04-06-2007 08:02 PM
dns not working! jimthing2001 Linux - Networking 19 05-28-2004 01:16 AM
DNS not working? dav7500 Linux - Networking 8 03-24-2004 03:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:39 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