LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 04-29-2011, 04:38 AM   #1
sysslack
Member
 
Registered: Feb 2006
Posts: 69

Rep: Reputation: 15
BIND problems


Hi I am trying to setup a simple local bind server, and I can' t figure howto write CNAME properly
OS=Centos 5.5
hostname: linux.local
tool=Perls dnswalk for trouble shoot and Webmin.

dnswalk generates this error:

Code:
[root@linux DNS]#perl dnswalk linux.local.  >logfile
Getting zone transfer of linux.local. from localhost...done.
0 failures, 0 warnings, 1 errors.
[root@linux DNS]# cat logfile 
Checking linux.local.
SOA=localhost	contact=root.linux.local
BAD: linux.local NS localhost: CNAME (to linux.local)
Code:
/var/named/slaves/linux.local.zone
$TTL 1H
@	IN	SOA	localhost. root.linux.local. (
			39
			3H
			1H
			1W
			1H )
@   IN    NS   localhost.      
       IN    NS   dns1.telia.com.
@       IN      A       127.0.0.1
@       IN      AAAA    ::1
Code:
/var/named/slaves/2.0.10.in-addr.arpa.zone
$TTL 1H
@	SOA	localhost.	root.localhost. (	2
						3H
						1H
						1W
						1H )
	NS	localhost.
Code:
/etc/named.conf
/ Red Hat BIND Configuration Tool
// 
// Default initial "Caching Only" name server configuration
//
controls {
                  inet 127.0.0.1 allow { localhost; } keys { rndckey; };
          };

zone "linux.local." IN {
	type master;
	file "slaves/linux.local.zone";
        allow-update {
               key rndckey;
                      };
};

zone "2.0.10.in-addr.arpa." IN {
	type master;
	file "slaves/2.0.10.in-addr.arpa.zone";
        allow-update {
               key rndckey;
                      };
};
options {
	directory "/var/named";
	dump-file "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
	/*
	 * If there is a firewall between you and nameservers you want
	 * to talk to, you might need to uncomment the query-source
	 * directive below.  Previous versions of BIND always asked
	 * questions using port 53, but BIND 8.1 uses an unprivileged
	 * port by default.
	 */
	 // query-source address * port 53;
	forwarders {
		10.0.2.1;
		};
};

include "/etc/rndc.key";
help would be appreciated

Last edited by sysslack; 04-29-2011 at 04:44 AM.
 
Old 04-29-2011, 06:12 AM   #2
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
Why don't you use a different hostname for the NS record?
Code:
@   IN    NS   ns      
       IN    NS   dns1.telia.com.
ns       IN      A       127.0.0.1
ns       IN      AAAA    ::1
@       IN      A       127.0.0.1
@       IN      AAAA    ::1
 
Old 04-29-2011, 09:06 AM   #3
sysslack
Member
 
Registered: Feb 2006
Posts: 69

Original Poster
Rep: Reputation: 15
Thanks for your reply. I am quite newbie when it comes to configure own DNS Server. I have followed an excellent guide, but something is wrong with my configuration.
http://www.youtube.com/watch?v=5R2NkiqsD_U

Any suggestion what I could write in the file. I tried many combinations and failed anyhow.
the rest of configuration
Code:
/etc/hosts

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost 

::1		localhost6.localdomain6 localhost6
Code:
/etc/resolv.conf
; generated by /sbin/dhclient-script
search linux.local telia.com 
nameserver 127.0.0.1
nameserver 195.67.199.15

Last edited by sysslack; 04-29-2011 at 09:28 AM.
 
Old 04-29-2011, 03:23 PM   #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
No suggestion.
Your configuration is correct in terms of bind configuration. I don't know why dnswalk complains.
You can check with named-checkzone:
Code:
named-checkzone -d linux.local /var/named/slaves/linux.local.zone
to verify the zone file, or try to resolve linux.local to see if your config works
Code:
dig linux.local @127.0.0.1
 
1 members found this post helpful.
Old 05-10-2011, 04:32 PM   #5
sysslack
Member
 
Registered: Feb 2006
Posts: 69

Original Poster
Rep: Reputation: 15
Thank you for your answer
and sorry for my late response.
The solution was simple:
I had fogot to configure my forwarders with my ISP :-)

Last edited by sysslack; 05-10-2011 at 04:33 PM. Reason: Solved!!!
 
Old 05-10-2011, 07:42 PM   #6
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Rep: Reputation: 107Reputation: 107
Thumbs up

Quote:
Originally Posted by sysslack View Post
Thank you for your answer
and sorry for my late response.
The solution was simple:
I had fogot to configure my forwarders with my ISP :-)
Please mark this thread as "SOLVED" (follow my signature).
 
Old 05-11-2011, 05:17 AM   #7
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Quote:
Originally Posted by madhuraj View Post
Please stop posting the same link to your site in every answer you give.

Kind regards
 
  


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
creating domain name in bind problems exposing bind to internal network abhijit_mohanta Linux - Networking 1 09-03-2009 01:09 AM
creating domain name in bind problems exposing bind to internal network abhijit_mohanta Linux - Security 1 09-03-2009 01:01 AM
BIND 8 problems unkn0wn Linux - Networking 4 07-08-2006 06:03 PM
BIND problems joel112 Linux - Software 1 02-20-2006 08:55 AM

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

All times are GMT -5. The time now is 11:30 PM.

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