Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13
Can someone please help me to configure BIND 9.5. I am running Fedora Core 8 in GUI and I have Webmin installed. I did a couple of things but it ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2008
    Posts
    4

    Exclamation How to configure BIND 9.5


    Can someone please help me to configure BIND 9.5.

    I am running Fedora Core 8 in GUI and I have Webmin installed.

    I did a couple of things but it does not seem to work. I created a master zone for my domain, in the master zone I configured the name server to my hostname. I have entered public DNS IP's in "Forwarding and Transfers" for my server to forward queries to.

    This does not work, when I try to access google I cannot but when I go out on the IP I have no problems.

    Can someone please tell me what am I leaving out or doing wrong.

    thanks,
    loik

  2. #2
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    Are you using chroot bind?
    Can you post your config files for bind?
    I don't use webmin so i cannot tell you what the problem is there.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  3. #3
    Just Joined!
    Join Date
    Sep 2008
    Posts
    4

    Exclamation

    Hi. Thanks for the reply.

    How do I know if I am using chroot bind?

    here are my config files:

    "named.conf":

    options {
    listen-on port 53 {127.0.0.1; };
    listen-on v6 port 53 { ::1; };
    directory "/var/named";
    dump-file "/var/named/data/cache_dump.db";
    statistics-file "/var/named/data/named_stats.txt";
    memstatistics-file "/var/named/data/named_mem_stats.txt";
    allow-query {localhost; };
    recursion yes;
    forwarders {
    168.210.2.2;
    196.14.239.2;
    };
    };

    logging {
    channel default_debug {
    file "data/named.run";
    severity dynamic;
    };
    };

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

    include "/etc/named.rfc1912.zones";

    zone "mydomain.co.za" {
    type master;
    file "/var/named/mydomain.co.za.hosts";
    };
    };


    "Master zone file":

    $ttl 38400
    mydomain.co.za IN SOA ns1.mydomain.co.za legrangeb.gmail.co.za (
    1221478551
    10800
    3600
    604800
    38400 )
    mydomain.co.za IN NS ns1.mydomain.co.za.

  4. #4
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    Quote Originally Posted by loik View Post
    Hi. Thanks for the reply.

    How do I know if I am using chroot bind?
    Look at the init script that starts bind.
    How is bind called?

    Did you install bind or bind-chroot?
    I think fedora defaults to the chroot bind.

    here are my config files:

    "named.conf":

    include "/etc/named.rfc1912.zones";

    What is this include statement?
    What is in this file?


    "Master zone file":

    $ttl 38400
    mydomain.co.za IN SOA ns1.mydomain.co.za legrangeb.gmail.co.za (
    1221478551
    10800
    3600
    604800
    38400 )
    mydomain.co.za IN NS ns1.mydomain.co.za.
    Where is the A record? You are saying that ns1 is the name server for mydomain.co.za but you are no telling the ip address of ns1 which is needed.

    What does your /etc/resolv.conf look like?

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  5. #5
    Just Joined!
    Join Date
    Sep 2008
    Posts
    4

    Exclamation

    I have managed to see that bind is installed in chroot.

    What I also did is deleted the “name.conf” file and my “mydomain.co.za.hosts” file and restarted bind. Bind then created a new “named.conf” file, this had only a master zone setup and not all the other default zones.

    I created a master zone for “mydomain.co.za” and created a A record for my name server. I have entered the ADSL route’s IP address in for forwarding and this is all working fine.

    This is my current named.conf file:

    options {
    directory "/etc/";
    pid-file "/var/run/named/named.pid";
    listen on port 53 {100.0.0.1;};
    forwarders {192.168.2.1;};
    };

    zone "." {
    type hint;
    file "/etc/db.cache";
    };

    zone "mydomain.co.za" {
    type master;
    file "/var/named/mydomain.co.za.hosts";
    };


    Master zone file:

    $ttl 38400
    mydomain.co.za IN SOA ns1.mydomain.co.za legrangeb.gmail.co.za (
    1221478551
    10800
    3600
    604800
    38400 )
    mydomain.co.za IN NS ns1.mydomain.co.za.
    ns1.mydomain.co.za IN A 100.0.0.1


    All well but now how do I configure bind to use the root zone and forward queries directly to the root DNS servers?

  6. #6
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    This is done with your hints file.

    Code:
     zone "." {
        type hint;
        file "/etc/db.cache";
        };
    


    You need to change this to something else unless you plan on using this file for your root servers.
    Maybe root.hints.db

    Here is what mine looks like:

    Code:
    zone "." IN {
                    type hint;
                    file "slaves/root.db";
            };
    I run a chroot environment with SELinux running.

    Then take a look at this site on how to update your hints file.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  7. #7
    Just Joined!
    Join Date
    Sep 2008
    Posts
    4

    Exclamation

    Do I have create a new file called "root.hints.db" and copy the information form "/etc/db.cache" in to this file and change my "named.conf" to point to this file?

    I don't know if I am understanding you right.

  8. #8
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    I would create a file called root.hints.db and then populate it like is outlined in the link above. I cannot tell you to copy over the contents of the cache file as I do not know what is in this file.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  9. #9
    Just Joined!
    Join Date
    Mar 2009
    Posts
    5
    Hello every one.
    I have a little “newbie” question here.
    I’m running Ubuntu server and bind9.5 . And accidently removed all the files from /etc/bind/
    Well now the bind won’t start.

    #/etc/init.d/bind9 status
    * bind9 is not running.

    #/etc/init.d/bind9 start
    * Starting domain name service... bind9 [fail]
    Here are the log entries:

    #tail /var/log/daemon.log
    Mar 13 17:03:08 nicks-server named[5935]: starting BIND 9.5.0-P2 -u bind
    Mar 13 17:03:08 nicks-server named[5935]: found 1 CPU, using 1 worker thread
    Mar 13 17:03:08 nicks-server named[5935]: loading configuration from '/etc/bind/named.conf'
    Mar 13 17:03:08 nicks-server named[5935]: none:0: open: /etc/bind/named.conf: file not found
    Mar 13 17:03:08 nicks-server named[5935]: loading configuration: file not found
    Mar 13 17:03:08 nicks-server named[5935]: exiting (due to fatal error)

    I tried to reinstall bind by but it gave me the same error.

    #sudo apt-get remove bind9
    #sud0 apt-get install bind9

    It there is a way I can copy the files or how can I fix the problem.
    Thank you for your time.

  10. #10
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    I hope you made backups of your config files. You don't have a named.conf file so bind doesn't know what to do. You need to recover from your backup or create a new namd.conf file.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •