LinuxQuestions.org
Help answer threads with 0 replies.
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-04-2005, 02:00 AM   #1
eckertc1
Member
 
Registered: Feb 2005
Posts: 57

Rep: Reputation: 15
Error!! when running named.conf


ok heres the scoop, i have set up DNS, created my zone files, made sure they were in the right directory and thought i had all my bases covered. WRONGE!

when i start up named and try to ping www.mydomain.com, i get (unknown host www.mydomain.com)

ok so what now. i figure ill check my log files for some insight on the problem so i open up messages log and i see this:

1. no IPv6 interfaces found
2. zone mydomain.com/IN: loading master file mydomian.zone: permission denied

any advice would be great here.
 
Old 03-04-2005, 02:19 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,222
Blog Entries: 1

Rep: Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076
Mind that the zone files you created must be owned by the user running named (usually named)
 
Old 03-04-2005, 02:22 AM   #3
eckertc1
Member
 
Registered: Feb 2005
Posts: 57

Original Poster
Rep: Reputation: 15
is there any way that i can determin exactly what user is running named. as things stand right now i am under the impression that it is running under Root. since that is where i am setting all this up at. but i may be wronge. and if it is running under root, wouldnt that mean it already has ownership
 
Old 03-04-2005, 02:29 AM   #4
eckertc1
Member
 
Registered: Feb 2005
Posts: 57

Original Poster
Rep: Reputation: 15
Hmm nm im a dolt. thank you for helping me out. the problem was the files were owned by root but not readable by anyone else. i set the files to readable and just like magic the error is gone. now i have more errors to get ironed out lol
 
Old 03-04-2005, 03:02 AM   #5
eckertc1
Member
 
Registered: Feb 2005
Posts: 57

Original Poster
Rep: Reputation: 15
ok, i hate to keep bugging people about my personal server issues but hey, thats what forums are for right .

i have all my previous issues fixed thks to bathory's suggestion but now im getting an error that reads as follows:

zone mydomain.com/IN: has no domain records.

im sifting through my zone files as i post this to find the problem but so far no luck.
 
Old 03-04-2005, 03:21 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,222
Blog Entries: 1

Rep: Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076
Why don't you post here your zone file to see what's wrong.
As for the user running named you can find who he is with:
Code:
ps aux|grep named
It's always good to run these services as a non priviledged user for security reasons
 
Old 03-04-2005, 03:26 AM   #7
eckertc1
Member
 
Registered: Feb 2005
Posts: 57

Original Poster
Rep: Reputation: 15
mydomain.zone (zone file)

$TTL 86400

@ IN SOA mydomian.com. hostmaster.mydomain.com. (
00023
3h
15m
1w
1d

; Name Servers
IN NS ns1.mydomain.com.
IN NS ns2.mydomail.com.

: CNAME for name based Vhosts
www.mydomain.com. IN CNAME www.mydomain.com
 
Old 03-04-2005, 03:34 AM   #8
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,222
Blog Entries: 1

Rep: Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076
Code:
@ IN SOA mydomian.com
I hope this is a typo: i.e mydomain.com not mydomian.com
Then you don't have the closing ")" before the line "; Name Servers"
and you have no "A" records (at least for your ns1, ns2, www)
 
Old 03-04-2005, 03:49 AM   #9
eckertc1
Member
 
Registered: Feb 2005
Posts: 57

Original Poster
Rep: Reputation: 15
i did not do a copy and paste so most of that was a typo (sorry)

the only thing that you suggested that is really something i dont have is the A records. do i need A records if im using name based Vhosts?

sorry for the dumb questions. im kind of learning this as i go here.
 
Old 03-04-2005, 04:00 AM   #10
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,222
Blog Entries: 1

Rep: Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076
You need "A" records for resolving hostnames to IP. As for Vhosts it's the webserver's job to give you the right pages based on the request you made.
If you want to learn DNS basics take a look here
 
Old 03-04-2005, 04:20 AM   #11
eckertc1
Member
 
Registered: Feb 2005
Posts: 57

Original Poster
Rep: Reputation: 15
ok ill try to wrap this up with just one more post here. with the current zone file:

$TTL 86400

@ IN SOA mydomain.com. hostmaster.mydomail.com. (
00023
3H
15M
1W
1D
)

; Name Servers
IN NS ns1.mydomain.com.
IN NS ns2.mydomain.com.

; CNAME
www.mydomain.com. IN CNAME www.mydomain.com.

; Public
ns1 IN A 127.0.0.1
ns2 IN A 127.0.0.1
www IN A xx.x.xxx.xxx


well there is the file. now here is the log report:

loading configuration from '/etc/named.conf'
no IPv6 interfaces found
dns_master_load: mydomain.zone:20 www.mydomain.com: CNAME and other data
zone mydomain.com/IN: loading master file mydomain.zone: CNAME and other data

when i try to ping www.mydomain.com it returns this:

Ping: unknown host www.mydomain.com

hope this helps to clear up the current issue. i would sure like to figure this out and write down my own walkthrough for future use
 
Old 03-04-2005, 07:39 AM   #12
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,222
Blog Entries: 1

Rep: Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076
Did you change the serial (i.e. the number after the SOA record, that is the 00023 in your case which must be increased every time you make a change) and restart named?
Also your CNAME the way you have it, is useless and anyway I think it's better to put a CNAME after the A record(s)
 
Old 03-04-2005, 09:12 AM   #13
Darin
Senior Member
 
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024

Rep: Reputation: 45
First, run:
named-checkconf /path_to/named.conf
Then run:
named-checkzone mydomain.com /path_to/mydomain.zone
and
named-checkzone 1.168.192.in-addr.arpa /path_to/reverse_dns.zone
where 1.168.192.in-addr.arpa is your IP subnet backwards ie this is for 192.168.1.0/24

these usually give you the best hint at what's wrong.

sample mydomain.zone file:
Code:
$ORIGIN .
$TTL 86400      ; 1 day
@   SOA  mydomain.com. root.mydomain.com. (
                                1          ; serial: whatever it is, increment it when you make changes!
                                28800      ; refresh (8 hours)
                                7200       ; retry (2 hours)
                                2419200    ; expire (4 weeks)
                                86400      ; minimum (1 day)
                                )
                        NS      ns.mydomain.com.
                        A       192.168.1.1
                        HINFO   "This is a computer"
                        MX      10 mail.mydomain.com.
                        TXT     "a DNS test"
ftp                     CNAME   mydomain.com.
mail                    CNAME   mydomain.com.
ns                      CNAME   mydomain.com.
www                     CNAME   mydomain.com.
This is probably the most simplistic zonefile possible. Basically anything not in here above the NS record is optional. The A records come first, define the IPs on the domain, this has no specified name because the computer at this IP is the domain. I think the NS record before the A record is the one exception to the previous sentence. After all A records are entered, make CNAMEs that ONLY point to A records, so no CNAME to CNAME to A record entries. The IN before anything is optional now, since it is the default type of record, so I leave them all out for simplicity.


Last edited by Darin; 03-04-2005 at 09:32 AM.
 
Old 03-04-2005, 05:43 PM   #14
eckertc1
Member
 
Registered: Feb 2005
Posts: 57

Original Poster
Rep: Reputation: 15
thank you all for your replies. i will be trying this again shortly with the changes you have suggested. ill try to update the post later if it worked for me.
 
Old 03-04-2005, 07:01 PM   #15
eckertc1
Member
 
Registered: Feb 2005
Posts: 57

Original Poster
Rep: Reputation: 15
could someone give me an example of a named.conf file? i seem to have the zone file ok by your standards but im still not up and running. here is an example of my named.conf:

options {
directory "/var/named"; }

controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};

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

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

zone "mydomain.com" IN {
type master;
file "mydomain.zone";
allow-update { none; };
};

zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};

include "/etc/rndc.key";


at the moment all im trying to accomplish is a simple apache server set up using my own dns for the domain. then only reason i am doing it this way is so that it is up and ready when i am ready to add more domains later. (and then there is the "i just wanna" aspect involved)

any help would be great

Last edited by eckertc1; 03-04-2005 at 07:04 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 -named.conf ryanc75 Linux - General 3 09-19-2005 02:57 AM
Annoying syntax error with named.conf d0ugb Linux - Networking 7 08-07-2005 12:20 PM
SUSE 9.1: named.conf works, but including separate conf files doesn't??? registering Linux - Distributions 0 06-09-2004 04:03 PM
cannot find named.conf and /var/named kaushikma Red Hat 1 02-07-2004 12:49 PM
cannot find named.conf kaushikma Linux - Networking 1 02-07-2004 09:42 AM

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

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