LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   bind & resolve local hosts (https://www.linuxquestions.org/questions/linux-networking-3/bind-and-resolve-local-hosts-202558/)

jingo_man 07-08-2004 07:55 AM

bind & resolve local hosts
 
Hi,

I have just config'ed bind for my SOHO.


very simple solution. have a zone "." which forwards to root servers.

then another zone "jingo.net" which is the name of my windows active directory/domain (though this should not make a difference...)

can resolve internet addresses fine (as posting here, for example)

unfortunately, cannot resolve other machine names on my lan. someone else has the "jingo.net" domain and whenever i ping an address, it dissapears off here...

should be able to make my domain "authoratative" for my local lan, but cannot seem to do it!!

any help would be appreciated...

this is my config:

zone "jingo.net" {
type master;
file "jingo.net";
allow-update { none; };
allow-query { any; };
};

zone "0.168.192.in-addr-arpa" {
type master;
file "192.168.0";
};

my jingo.net file:

$TTL 86400
@ IN SOA jingo.net. burtd.jingo.net. (
2004070801 ; Serial number
86400 ; Refresh 1 day
7200 ; Retry 2 hours
3600000 ; Expire 41.67 days
172800 ) ; Minimum TTL 2 days

IN NS jingolinux.jingo.net.

jingolinux IN A 192.168.0.13
jingodc01 IN A 192.168.0.1
jingodingo IN A 192.168.0.11
jingolap01 IN A 192.168.0.12

any obvious errors/omissions?

thanks,

dan

keefaz 07-08-2004 08:12 AM

can you post your 192.168.0 file ?

Also I noticed that your named.conf is incomplete (but maybe you posted just a part of it)
options {
// indicate where the zones files are
directory "/var/named";
};

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

jingo_man 07-08-2004 08:36 AM

hi keefaz,

sorry, was trying to be concise....

full named.conf:

// generated by named-bootconf.pl

acl "jingohosts" { 127/8; 192.168.0.0/24; };

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

// forwarding to root servers. this can be sourced from ftp://ftp.rs.internic.net/domain/named.root
zone "." IN {
type hint;
file "named.ca";
};

//dns for localhost

//example file does not have allow-update line at all
zone "localhost" IN {
type master;
file "localhost.zone";
};

//reverse lookup. again does not have allow-update line
zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
};

//translation for domain jingo.net
zone "jingo.net" {
type master;
file "jingo.net";
allow-update { none; };
allow-query { any; };
};

//reverse trans for jingo.net
zone "0.168.192.in-addr-arpa" {
type master;
file "192.168.0";
};


include "/etc/rndc.key";



full 192.168.0:

0.168.192.in-addr.arpa. SOA jingolinux.jingo.net. burtd.jingo.net. (
2004070800 ; Serial number
86400 ; Refresh 1 day
7200 ; Retry 2 hours
3600000 ; Expire 41.67 days
172800 ) ; Minimum TTL 2 days

0.168.192.in-addr.arpa. NS jingolinux.jingo.net.

13.0.168.192.in-addr.arpa. PTR jingolinux.jingo.net.
1.0.168.192.in-addr.arpa. PTR jingodc01.jingo.net.
11.0.168.192.in-addr.arpa. PTR jingodingo.jingo.net.
12.0.168.192.in-addr.arpa. PTR jingolap01.jingo.net.



in trying to solve the issue, i have added some extra bits. they haven't seemed to affected functionality to the web, but no further with local host resolving. one of these additions is the "acl" in the named.conf file.

thanks again

dan

keefaz 07-08-2004 11:56 AM

I would try (full 192.168.0) :
Code:

$TTL 86400
@ IN SOA jingolinux.jingo.net. burtd.jingo.net. (
    2004070800 ; Serial number
    86400 ; Refresh 1 day
    7200 ; Retry 2 hours
    3600000 ; Expire 41.67 days
    172800 ) ; Minimum TTL 2 days

13.0.168.192.in-addr.arpa. IN NS jingolinux.jingo.net.

13.0.168.192.in-addr.arpa. IN PTR jingolinux.jingo.net.
1.0.168.192.in-addr.arpa. IN PTR jingodc01.jingo.net.
11.0.168.192.in-addr.arpa. IN PTR jingodingo.jingo.net.
12.0.168.192.in-addr.arpa. IN PTR jingolap01.jingo.net.

While copy your config file I noticed an adress error for your NS entry, I corrected it

jingo_man 07-08-2004 01:13 PM

have changed my "192.168.0" file to what you had posted. my "jingo.net" looked like this, but had not changed the reverse lookup to be the same...

still having the same problem though!

at the bottom of the reply, you also point out an error with NS entry in config file. could you explicitly point this out? looking at mine, it seems ok...
what is the "controls {}" section about? is this the area that sets it up as a caching nameserver rather than an authorative nameserver?

i have tried commenting out the "controls" section highlighted above, but still have same issue...

thanks again

dan

jingo_man 07-08-2004 01:50 PM

am sure that both the local box and another windows box are using this as its dns server (both have specified within their systems and also when turned on windows box this morning, hadn't started named daemon on linux box so no internet connectivity)

is there a way to view a log file for this at all?

keefaz 07-08-2004 02:43 PM

# tail /var/log/messages | grep named

I pointed out an error in your 192.168.0 zone file :
0.168.192.in-addr.arpa. NS jingolinux.jingo.net.
the reverse adress for your name server should be 13.0.168.192.in-addr.arpa.

In your /etc/named.conf, try
Code:

//This section is used by the rndc utility, it is a command line tool
//for named, remove the control section if you don't need it
controls {
        inet 127.0.0.1 port 53 allow {any; };
};

options {
        directory "/var/named";
        recursion true;
        forwarders {
                        // replace these by your ISP nameservers
                        xxx.xxx.xxx.xxx;
                        xxx.xxx.xxx.xxx;
                };
        notify no;
        statistics-interval 1;
};

logging {
        channel _default_log  {
                file "/var/log/named.log";
                severity info;           
                print-time yes;                                     
        };
        category default {                             
                _default_log;                               
        };                                                               
};


jingo_man 07-08-2004 02:56 PM

cracked it!!!

was using some process called "chroot" - kind of understand the function of this (to help security...) but created copy of "named" file structure. just needed to overwrite the named.conf from /etc/named.conf to /chroot/etc/named.conf and copy the zone files to this location

thanks for your help with this though. much appreciated.

dan


All times are GMT -5. The time now is 02:10 AM.