LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 11-10-2004, 10:48 AM   #1
caocon
LQ Newbie
 
Registered: Oct 2004
Posts: 6

Rep: Reputation: 0
Angry DNS in Fedora core 2


I'm using Fedora core 2
One beautiful day, I want to configure DNS server .I did everything the same in books , but it didn't work !` ! ! (
I installed RedHat 8.0 and did the same , wow it worked ! ! ! I saved all files (etc/named.config , etc/host , var/named/192.168.3 , var/named/caocon.com) and installed Fedora core 2 .After that, I copied all that files into Fedora core 2! ! ! aha ahahah.a.a.a... It didn't work ! ! !
So could you help me to solve this problem ?




This is my DNS config

etc/named.conf

// generated by named-bootconf.pl

options {
directory "/var/named";
/*
* 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;
};

//
// a caching only nameserver config
//
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 "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};


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

zone "3.168.192.in-addr.arpa" IN {
type master;
file "192.168.3";
allow-update { none; };
};$TTL 86400
@ IN SOA ns.caocon.com. hostmaster.caocon.com. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum

TXT "caocon.com, your DNS consultants"
NS ns ; Inet Address of name server
NS ns.friend.com.
MX 10 mail ; Primary Mail Exchanger
MX 20 mail.friend.bogus. ; Secondary Mail Exchanger

localhost A 127.0.0.1

gw A 192.168.3.1
TXT "The router"

ns A 192.168.3.1
MX 10 mail
MX 20 mail.friend.bogus.
www CNAME ns

donald A 192.168.3.2
MX 10 mail
MX 20 mail.friend.bogus.
TXT "DEK"

mail A 192.168.3.3
MX 10 mail
MX 20 mail.friend.bogus.

ftp A 192.168.3.4
MX 10 mail
MX 20 mail.friend.bogus.


include "/etc/rndc.key";

==================================
var/named/caocon.com

$TTL 86400
@ IN SOA ns.caocon.com. hostmaster.caocon.com. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum

TXT "caocon.com, your DNS consultants"
NS ns ; Inet Address of name server
NS ns.friend.com.
MX 10 mail ; Primary Mail Exchanger
MX 20 mail.friend.bogus. ; Secondary Mail Exchanger

localhost A 127.0.0.1

gw A 192.168.3.1
TXT "The router"

ns A 192.168.3.1
MX 10 mail
MX 20 mail.friend.bogus.
www CNAME ns

donald A 192.168.3.2
MX 10 mail
MX 20 mail.friend.bogus.
TXT "DEK"

mail A 192.168.3.3
MX 10 mail
MX 20 mail.friend.bogus.

ftp A 192.168.3.4
MX 10 mail
MX 20 mail.friend.bogus.
================================================

var/named/192.168.3

$TTL 86400
@ IN SOA ns.caocon.com. hostmaster.caocon.com. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS ns.caocon.com.

1 IN PTR gw.caocon.com.
2 IN PTR ns.caocon.com.
3 IN PTR donald.caocon.com.
4 IN PTR mail.caocon.com.
5 IN PTR ftp.caocon.com.

==================================================

etc/host

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

================================================

etc/rndc.conf

key "rndckey" {
algorithm hmac-md5;
secret "c3Ryb25nIGVub3VnaCBmb3IgYSBtYW4gYnV0IG1hZGUgZm9yIGEgd29tYW4K";
};


options {
default-server 192.168.3.1;
default-key "rndckey";
};

server 192.168.3.1 {
key "rndckey";
};

=======================================================
rndc.key

key "rndckey" {
algorithm hmac-md5;
secret "9hPhuIbBEFY2GyVO5QQZbznkjxXucHV1PSuY7er0MqDooXgSq8eclOdSu7F2";
};

=============================================================

Thanks for youe help !
 
Old 11-10-2004, 01:00 PM   #2
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 117Reputation: 117
Is the named server running? Do you get any errors?

What HAPPENS to make you believe it is not "working"?
 
Old 11-10-2004, 02:12 PM   #3
RHELL
Member
 
Registered: Feb 2004
Location: Outermost mingetty
Distribution: RHEL3,RH4U4,Sol9, Sol10
Posts: 321

Rep: Reputation: 31
Does the following string really exist in named.conf as you posted?

>>;$TTL 86400
>>@ IN SOA ns.caocon.com. hostmaster.caocon.com. (
>>1997022700 ; Serial
>>28800 ; Refresh
>>14400 ; Retry
>>3600000 ; Expire
>>86400 ) ; Minimum

>>TXT "caocon.com, your DNS consultants"
>>NS ns ; Inet Address of name server
>>NS ns.friend.com.
>>MX 10 mail ; Primary Mail Exchanger
>>MX 20 mail.friend.bogus. ; Secondary Mail Exchanger

>>localhost A 127.0.0.1

>>gw A 192.168.3.1
>>TXT "The router"

>>ns A 192.168.3.1
>>MX 10 mail
>>MX 20 mail.friend.bogus.
>>www CNAME ns

>>donald A 192.168.3.2
>>MX 10 mail
>>MX 20 mail.friend.bogus.
>>TXT "DEK"

>>mail A 192.168.3.3
>>MX 10 mail
>>MX 20 mail.friend.bogus.

>>ftp A 192.168.3.4
>>MX 10 mail
>>MX 20 mail.friend.bogus.
 
Old 11-10-2004, 02:41 PM   #4
Darin
Senior Member
 
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024

Rep: Reputation: 45
Like Matir mentioned, what makes you say it doesn't work? can you get normal internet names like www.linuxquestions.org? can you get your own domain like caocon.com? Are you trying in a web browser, or a shell prompt, or what do you do to see if it works?

Try these commands in a terminal window: 'dig caocon.com' and 'dig -x 192.168.3.1', they should respond with your DNS server in the answer section. If not then check that /etc/resolv.conf has:
Code:
search caocon.com
#one of these nameserver lines, either should work
nameserver 127.0.0.1
nameserver 192.168.3.1
 
Old 11-10-2004, 02:48 PM   #5
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 117Reputation: 117
As a question of my own, is the search line there required? I use a LAN DNS server for names such as "ozone", "tritium', etc. for my computers. In order to get them to resolve, I had to remove the search line from my resolv.conf. If I do need this line, I guess I need to edit my DNS server , but things seem to run fine right now.
 
Old 11-10-2004, 07:17 PM   #6
Darin
Senior Member
 
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024

Rep: Reputation: 45
I belive the search line is for using multiple DNS servers and pointing lookups for a specific domain to a specific server.. This means if you are using one DNS server for your specific domain(s) and it also forewards DNS lookups for other domains (the zone "." { type hint; file "named.ca"; }; line in named.conf) then you shouldn't have to have a search line. Everything I have read about DNS config tells you to put it in there so I just do even though it is probably not required.
 
Old 11-11-2004, 09:16 AM   #7
caocon
LQ Newbie
 
Registered: Oct 2004
Posts: 6

Original Poster
Rep: Reputation: 0
Question

I just create a domain for my LAN.
I knew it work in Redhat 8.0 because when I used commands : dig -x 127.0.0.1 ; dig -x 192.168.3.1 ; dnslookup ... ; server www.caocon.com ; server mail.caocon.com , all of them worked very well.
But in Fedora , I didn't get the same result.

for emxaple :
===================================
[root@caocon root]# dig -x 127.0.0.1

; <<>> DiG 9.2.3 <<>> -x 127.0.0.1
;; global options: printcmd
;; connection timed out; no servers could be reached
=====================================
[root@caocon root]# nslookup
> server www.caocon.com
nslookup: Couldn't find server 'www.caocon.com': Temporary failure in name resolution
=====================================
[root@caocon root]# rndc reload
rndc: connect failed: network unreachable
=====================================


You see , It make me angry :~((


Thank you .
 
Old 11-11-2004, 04:57 PM   #8
Darin
Senior Member
 
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024

Rep: Reputation: 45
post the results of:
[root@caocon root]# named-checkconfig
[root@caocon root]# named-checkzone localhost /var/named/localhost.zone
[root@caocon root]# named-checkzone 0.0.127.in-addr.arpa /var/named/named.local
[root@caocon root]# named-checkzone caocon.com /var/named/caocon.com
[root@caocon root]# named-checkzone 3.168.192.in-addr.arpa /var/named/192.168.3

Basically any one that doesn't say OK in the result means that zonefile is bad, it usually gives you the line # of anything problematic. If all those say OK then it's most likely in your named.conf

edit- I also had a problem with RedHat that you might be experiencing where the init script isn't set up to properly shutdown the nameserver. So if you are trying to reload named and it doesn't seem to change anything, killall -9 named is just as easy to type as service named stop

Last edited by Darin; 11-11-2004 at 05:30 PM.
 
Old 11-11-2004, 07:06 PM   #9
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 117Reputation: 117
Quote:
Originally posted by Darin

edit- I also had a problem with RedHat that you might be experiencing where the init script isn't set up to properly shutdown the nameserver. So if you are trying to reload named and it doesn't seem to change anything, killall -9 named is just as easy to type as service named stop
Try a nice -HUP first perhaps. I don't know how named responds to that, but some software likes a bit more graceful shutdown than -9
 
Old 11-11-2004, 07:55 PM   #10
scowles
Member
 
Registered: Sep 2004
Location: Texas, USA
Distribution: Fedora
Posts: 620

Rep: Reputation: 31
Quote:
Originally posted by Matir
Try a nice -HUP first perhaps. I don't know how named responds to that, but some software likes a bit more graceful shutdown than -9
From: man named
Code:
SIGNALS
       In  routine  operation, signals should not be used to control the name-
       server; rndc should be used instead.
 
       SIGHUP Force a reload of the server.
 
       SIGINT, SIGTERM
              Shut down the server.
 
       The result of sending any other signals to the server is undefined.
 
Old 11-11-2004, 08:20 PM   #11
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 117Reputation: 117
Ah, indeed. Though -HUP, PER DOCUMENTATION, is the proper way (ignoring control scripts) to reload the server.
 
Old 11-12-2004, 12:27 AM   #12
Darin
Senior Member
 
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024

Rep: Reputation: 45
Good ideas although someone needs to tell the guys at Slackware that...

from Slackware 9.1 /etc/rc.d/rc.bind:
Code:
...
# Stop bind:
bind_stop() {
  killall named
}
...
edit- that's what I get for posting too late at night, killall without the -9 sends a SIGTERM anyhow.

Last edited by Darin; 11-12-2004 at 02:00 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
Fedora Core 3 DNS startup wgaivin Linux - Networking 4 04-12-2005 09:55 AM
DNS server on Fedora Core 3 mediocrity Linux - Networking 16 04-11-2005 09:56 AM
fedora core 2 / apache / dns / mail server rioguia Linux - Security 2 01-18-2005 02:01 PM
On Fedora Core 2 what DNS server am I using? jlepich Linux - Networking 2 06-22-2004 05:26 PM
Dns is not working in Fedora Core 1 Mahaul Fedora 2 05-14-2004 03:41 PM


All times are GMT -5. The time now is 01:53 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration