Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 20
Hi, Im trying to configure bind but everything I do, it doesnt work. I dont know allot about bind and how it work etc.. I looked for some good tutorials ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Jst
    Jst is offline
    Just Joined!
    Join Date
    Aug 2004
    Posts
    68

    Configuring Bind9


    Hi,
    Im trying to configure bind but everything I do, it doesnt work. I dont know allot about bind and how it work etc.. I looked for some good tutorials but couldnt find anything good, so I was wondering if I could get some help here .

    It only has to work on my local computers.

    This is my named.conf:
    Code:
    options {
     directory "/var/cache/bind";
     auth-nxdomain no;    # conform to RFC1035
    };
    
    zone "." {
     type hint;
     file "/etc/bind/db.root";
    };
    
    zone "localhost" {
     type master;
     file "/etc/bind/db.local";
    };
    
    zone "127.in-addr.arpa" {
     type master;
     file "/etc/bind/db.127";
    };
    
    zone "prophet.lan" {
     type master;
     file "/etc/bind/db.prophet.lan";
    };
    
    zone "255.in-addr.arpa" {
     type master;
     file "/etc/bind/db.255";
    };
    And this is the zone file:
    Code:
    $TTL 604800
    @ IN SOA prophet. root.prophet.lan. (
             1  ; Serial
        604800  ; Refresh
         86400  ; Retry
       2419200  ; Expire
        604800 ) ; Negative Cache TTL
      NS buijgers.lan.
    
    localhost  A 127.0.0.1
    router  A 192.168.0.1
    prophet.lan. A 192.168.0.112
    
    pentest  CNAME prophet.lan.
    I want to be able to just enter www.prophets.lan on any computer that is connected to my network and have it automaticly acces my webserver

    Tnx in advance
    Jst.

  2. #2
    Linux Newbie
    Join Date
    Mar 2005
    Posts
    230
    Well I see you've got a "prophet.lan" zone all ready for action, but where's the "www" A record assigning the webserver's private IP to the hostname? You've got something going on for localhost, router, and pentest, but no www.

  3. #3
    Jst
    Jst is offline
    Just Joined!
    Join Date
    Aug 2004
    Posts
    68
    So this is how I should make the zonefile for prophet.lan look:

    Code:
    $TTL 604800
    @ IN SOA prophet. root.prophet.lan. (
             1  ; Serial
        604800  ; Refresh
         86400  ; Retry
       2419200  ; Expire
        604800 ) ; Negative Cache TTL
      NS buijgers.lan.
    
    localhost  A 127.0.0.1
    router  A 192.168.0.1
    prophet.lan. A 192.168.0.112
    
    pentest  CNAME prophet.lan.
    www  CNAME prophet.lan
    Jst.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Newbie
    Join Date
    Mar 2005
    Posts
    230
    I've got 2 problems with that. One, you added a CNAME record, which isn't the best way to go. I said you needed to add an A record. Two, you forgot the period at the end of prophet.lan, which totally screws that up.

  6. #5
    Jst
    Jst is offline
    Just Joined!
    Join Date
    Aug 2004
    Posts
    68
    This is how it looks now:

    Code:
    $TTL 604800 
    @ IN SOA prophet. root.prophet.lan. ( 
    * * * * *1* ; Serial 
    * * 604800* ; Refresh 
    * * *86400* ; Retry 
    * *2419200* ; Expire 
    * * 604800 ) ; Negative Cache TTL 
    * NS buijgers.lan. 
    
    localhost* A 127.0.0.1 
    router* A 192.168.0.1 
    prophet.lan. A 192.168.0.112 
    www A 192.168.0.112
    
    pentest* CNAME prophet.lan.
    I dont know if this is right..
    Well, uit still isnt working, the pentest wasnt working either, router also doesnt work..

    Jst.

  7. #6
    Linux Newbie
    Join Date
    Mar 2005
    Posts
    230
    Well the zone file is fine, you probably just need to set your /etc/resolv.conf apropriately. Show me the file's current contents.

  8. #7
    Jst
    Jst is offline
    Just Joined!
    Join Date
    Aug 2004
    Posts
    68
    I dindt know I had to edit resolv.conf, so its still in its original state..

    Code:
    search
    nameserver 62.108.1.67
    nameserver 212.142.28.66
    Jst.

  9. #8
    Jst
    Jst is offline
    Just Joined!
    Join Date
    Aug 2004
    Posts
    68
    It was pretty abvious on how I should change resolv.conf..

    Code:
    search 
    nameserver 192.168.0.112
    Everything works fine now, thanks allot .

    Jst.

  10. #9
    Linux Newbie
    Join Date
    Mar 2005
    Posts
    230
    Change these two lines:

    nameserver 62.108.1.67
    nameserver 212.142.28.66

    to this line only:

    nameserver 127.0.0.1

    Also, changed your named.conf so that these lines:

    options {
    directory "/var/cache/bind";
    auth-nxdomain no; # conform to RFC1035
    };

    Look like these lines:

    options {
    directory "/var/cache/bind";
    auth-nxdomain no; # conform to RFC1035
    recursion yes;
    allow-recursion { 127.0.0.1; };
    forwarders { 62.108.1.67; 212.142.28.66; };
    };

    I think that looks pretty good.

  11. #10
    Linux Newbie
    Join Date
    Mar 2005
    Posts
    230
    looks like you replied while I was typing. You don't need to implement the changes I suggested. What you did is fine.

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
  •