Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
03-04-2005, 02:00 AM
|
#1
|
Member
Registered: Feb 2005
Posts: 57
Rep:
|
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.
|
|
|
03-04-2005, 02:19 AM
|
#2
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,222
|
Mind that the zone files you created must be owned by the user running named (usually named)
|
|
|
03-04-2005, 02:22 AM
|
#3
|
Member
Registered: Feb 2005
Posts: 57
Original Poster
Rep:
|
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
|
|
|
03-04-2005, 02:29 AM
|
#4
|
Member
Registered: Feb 2005
Posts: 57
Original Poster
Rep:
|
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
|
|
|
03-04-2005, 03:02 AM
|
#5
|
Member
Registered: Feb 2005
Posts: 57
Original Poster
Rep:
|
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.
|
|
|
03-04-2005, 03:21 AM
|
#6
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,222
|
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:
It's always good to run these services as a non priviledged user for security reasons
|
|
|
03-04-2005, 03:26 AM
|
#7
|
Member
Registered: Feb 2005
Posts: 57
Original Poster
Rep:
|
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
|
|
|
03-04-2005, 03:34 AM
|
#8
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,222
|
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)
|
|
|
03-04-2005, 03:49 AM
|
#9
|
Member
Registered: Feb 2005
Posts: 57
Original Poster
Rep:
|
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.
|
|
|
03-04-2005, 04:00 AM
|
#10
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,222
|
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
|
|
|
03-04-2005, 04:20 AM
|
#11
|
Member
Registered: Feb 2005
Posts: 57
Original Poster
Rep:
|
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 
|
|
|
03-04-2005, 07:39 AM
|
#12
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,222
|
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)
|
|
|
03-04-2005, 09:12 AM
|
#13
|
Senior Member
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024
Rep:
|
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.
|
|
|
03-04-2005, 05:43 PM
|
#14
|
Member
Registered: Feb 2005
Posts: 57
Original Poster
Rep:
|
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.
|
|
|
03-04-2005, 07:01 PM
|
#15
|
Member
Registered: Feb 2005
Posts: 57
Original Poster
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 03:45 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|