#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2012
    Posts
    2
    Rep Power
    0

    Setting up DNS using BIND


    i have troubles setting up my db files.
    Please kindly point me in the right direction!

    i need to define a nameserver that manage a domain example.org.au

    then i need it to have two records. one called server which is the ip address of current machine

    the other called www where www.example.org.au will be pointed to another ip address.

    i cant seem to get my system to work.

    This is my db.example.org.au file

    Code:
    example.org.au. IN SOA server.example.org.au. (
    1;
    3;
    1h;
    1w;
    1h ) ;
    ;
    
    ;Host addresses
    localhost.example.org.au IN A 127.0.0.1
    www.example.org.au. IN A 192.168.1.200 ; another virtual machine
    server.example.org.au IN A 192.168.1.199 ; current virtual machine
    If possible Please correct my errors! thanks!

    Any good guides out there?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2010
    Location
    Florida
    Posts
    248
    Rep Power
    4
    Check out the below links on file formats. If you are new to DNS, it's best to take an example file format and just modify the parts to what you need.


    http://en.wikipedia.org/wiki/Zone_file#File_format
    http://www.zytrax.com/books/dns/ch8/index.html#zone
    http://corpocrat.com/2008/09/29/sample-dns-zone-file-for-bind/

    The semicolons and such are not required in the zone file, just saying. They can help sometimes but technically not needed.
  4. #3
  5. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,441
    Rep Power
    4539
    Also I think you need a trailing period if you're specifying the full url for the host name.
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2012
    Posts
    23
    Rep Power
    0
    $TTL 1h;
    <domain> IN SOA server.example.org.au. (
    20120531;
    3d;
    1h;
    1w;
    1h;
    )

    <Domain> NS ns1.example.org.au. ;
    <Domain> NS ns2.example.org.au. ;
    localhost A 127.0.0.1;
    server A 192.168.1.200 ; another virtual machine
    www CNAME <Domain>.;
    <domain> A 192.168.1.199 ; current virtual machine

IMN logo majestic logo threadwatch logo seochat tools logo