LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   DNS problem (https://www.linuxquestions.org/questions/linux-newbie-8/dns-problem-204157/)

Imster 07-12-2004 01:45 PM

DNS problem
 
This probably has been asked before and if so i apologise.

Im trying to set up the DNS on my Fedora Core 2 box for a domain name I have. Apache works, its just the DNS..

I edited the files manually (backing them up before hand) and used Red Hat's site to guide me.. I have pasted the /etc/named.conf file below, but if someone could help me that would be great :)

// 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 "media4insight.com" IN {
type master;
file "media4insight.com.zone";
allow-update { none; };

include "/etc/rndc.key";


Thanks in advance..
:newbie:

Pete M 07-12-2004 02:16 PM

Imster

Are you aware of this
Quote:

Fedora takes the added precaution of using Linux's chroot feature to not only run named as user named but also to limit the files named can see. In Fedora, named is fooled into thinking that the directory /var/named/chroot is actually the root or "/" directory. Therefore named files normally found in the /etc directory are found in /var/named/chroot/etc directory instead, and those you'd expect to find in /var/named are actually located in /var/named/chroot/var/named.

Fedora BIND adds to the confusion by correctly installing the files in their non chroot locations, but they are never read.

Note: With Fedora, make copies of your regular and chroot files. The chroot version of named.conf is empty, cut and paste the contents of the /etc version into this file, it is a little safer than copying as the file permissions and ownerships are different too.
Can you be a bit more specific as to what the problem with Bind is /etc/named.conf looks OK to me

Pete

Imster 07-12-2004 02:22 PM

Ahh well it definately fooled me heh :mad:

well Ive made media4insight.com.zone and put it where *i thought* named would look. but after reading that quote it seems I should be editing something else somewhere else...DOH!

The actual problem is that media4insight.com doesnt seem to resolve to me, I guess this will change after i edit the correct named files? (the nameservers DO point to my IP)

Thanks..

Pete M 07-12-2004 03:10 PM

Hi Imster

The current DNS servers for media4insight.com are

ns0.no-ip.co.uk.
ns1.no-ip.co.uk.

But these do not appear to be authoritative for your domain

There's a lot more to DNS than simply running named on your machine

Not trying to criticize, just help

Pete

JJX 07-12-2004 03:22 PM

- You dont have a reverse zone for media4insight.com
- You can search for a dns book (example Oreilly) ;)

Imster 07-12-2004 03:29 PM

Thanks for the replies, yes i am aware that named isnt the solution heh :p

I will read up on it more, although I was sure I did it correctly..I obviously didnt (otherwise it would work), will post the outcome if i get anywhere in case anybody else has a similar problem at some point..

Pete M 07-12-2004 03:30 PM

JJX

He can't have a reverse zone his ISP will be responsible for that I'm assuming Imster is on a home PC with perhaps a cable connection

Pete

Imster 07-12-2004 03:36 PM

Yes thats about it..And the ns0.no-ip.co.uk and ns1.no-ip.co.uk resolve to my IP

JJX 07-13-2004 02:27 AM

sorry, i thought it was doing that to his lan and was using this address for example :>

Imster 07-14-2004 02:30 AM

DNS works hoorah
 
Ok, I got the DNS problem sorted with (alot of) help from Pete M..(thanks)

I dont think id want to do it again in a hurry though.

Was a simple error in named.conf, basically missed out a "}" and then it was a simple zone edit..thanks for all the help guys

red_nectar 07-14-2004 07:25 AM

I have a very similar problem - FC2, worked out the config files had moved but still can't get named to start properly. Messages log file shows:


Jul 14 12:11:55 Linux1 named[2985]: starting BIND 9.2.3 -u named -t /var/named/chroot
Jul 14 12:11:55 Linux1 named[2985]: using 1 CPU
Jul 14 12:11:55 Linux1 named[2985]: loading configuration from '/etc/named.conf'
Jul 14 12:11:55 Linux1 named[2985]: listening on IPv4 interface lo, 127.0.0.1#53
Jul 14 12:11:55 Linux1 named[2985]: listening on IPv4 interface eth0, 44.0.0.99#53
Jul 14 12:11:55 Linux1 named[2985]: listening on IPv4 interface eth1, 44.0.3.61#53
Jul 14 12:11:55 Linux1 named[2985]: couldn't add command channel 127.0.0.1#953: not found
Jul 14 12:11:55 Linux1 named[2985]: couldn't add command channel ::1#953: not found
Jul 14 12:11:55 Linux1 named[2985]: zone 0.0.127.in-addr.arpa/IN: loading master file 0.0.127.in-addr.arpa.zone: file not found
Jul 14 12:11:55 Linux1 named[2985]: zone 0.0.44.in-addr.arpa/IN: loading master file 0.0.44.in-addr.arpa.zone: file not found
Jul 14 12:11:55 Linux1 named[2985]: zone 3.0.44.in-addr.arpa/IN: loading master file 3.0.44.in-addr.arpa.zone: file not found
Jul 14 12:11:55 Linux1 named[2985]: zone 1.0.45.in-addr.arpa/IN: loading master file 1.0.45.in-addr.arpa.zone: file not found
Jul 14 12:11:55 Linux1 named[2985]: zone 2.0.45.in-addr.arpa/IN: loading master file 2.0.45.in-addr.arpa.zone: file not found
Jul 14 12:11:55 Linux1 named[2985]: zone iit.com/IN: loading master file iit.com.zone: file not found
Jul 14 12:11:55 Linux1 named[2985]: zone localhost/IN: loading master file localhost.zone: file not found
Jul 14 12:11:55 Linux1 named[2985]: running
Jul 14 22:11:55 Linux1 named: named startup succeeded

but a listing of /var/named/chroot/var/named shows:

/var/named/chroot/var/named
[root@Linux1 named]# ls -al
total 48
drwxr-x--- 2 root named 4096 Jul 10 15:52 .
drwxr-xr-x 4 root root 4096 Jul 8 16:57 ..
-rw-r--r-- 1 named named 177 Jul 10 15:52 0.0.127.in-addr.arpa.zone
-rw-r--r-- 1 named named 174 Jul 10 15:52 0.0.44.in-addr.arpa.zone
-rw-r--r-- 1 named named 174 Jul 10 15:52 1.0.45.in-addr.arpa.zone
-rw-r--r-- 1 named named 174 Jul 10 15:52 2.0.45.in-addr.arpa.zone
-rw-r--r-- 1 named named 174 Jul 10 15:52 3.0.44.in-addr.arpa.zone
-rw-r--r-- 1 named named 648 Jul 10 15:52 iit.com.zone
-rw-r--r-- 1 named named 173 Jul 10 15:26 .in-addr.arpa.zone
-rw-r--r-- 1 named named 188 Jul 10 15:52 localhost.zone
-rw-r--r-- 1 root root 2518 Jul 8 16:57 named.ca
-rw-r--r-- 1 root root 433 Jul 8 16:57 named.local

I've also tried putting copies of these files in /var/naemd as well (in cahe the chroot thing wasn't working) but did no good. Would love it if you could post/send me a copy of your named.conf

My config is for a lab, so I don't need to talk to root servers, and the IPs and domains are fictitious

Imster 07-14-2004 07:57 AM

Sure,
its pasted below:
Code:

// 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 "media4insight.com" IN {
        type master;
        file "media4insight.com.zone";
        allow-update { none; };
};

include "/etc/rndc.key";


vgeorge 07-24-2004 12:49 PM

Make DNS work
 
in "-> etc/rc.d/init.d/named <-"
remove the "-> ${OPTIONS} <-" in line after start() <-"
"-> daemon /usr/sbin/named -u named ${OPTIONS} <-"
so it will be
"-> daemon /usr/sbin/named -u named <-"

This will make named run without -t paramater as like Red Hat 9


George Vourliotis
Hellas (Greece)


All times are GMT -5. The time now is 09:44 PM.