Unix tutorial Contact as






Setting Up DNS Server on FreeBsd

The original of this article you can find here.

DNS (Domain Name Service) Server is an important server for the Internet. It determines the name of network-computer within the Internet. The main work of the DNS server is exchange IP address to the hostname, hostname to the IP address. As mentioned in the Mail Server page, MX record is often required and is provided by the DNS server.

In the FreeBSD System, the configuration file is distributed in the directory; /etc/namedb/. The important files are:

  • named.conf
  • named.root

    acl hosts-allow {
    localhost;
    209.216.123.13;
    209.216.123.14;
    };

    options {
    directory "/etc/namedb";
    allow-transfer { hosts-allow; };
    };

    zone "v-dt.com" in {
    type master;
    file "v-dt.com.zone";
    };

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

    zone "SUB128.221.224.202.in-addr.arpa" in {
    type master;
    file "SUB128.221.224.202.rev";
    };

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

    for each file,v-dt.com.zone and SUB128.221.224.202.rev describes the relationship between IP address and host-name as shown below:

    $TTL 86400
    
    @       IN      SOA     nsa.v-dt.com. admin.nsa.v-dt.com.  (
                                    200108284       ; Serial
                                    3600    ; Refresh
                                    900     ; Retry
                                    3600000 ; Expire
                                    3600 )  ; Minimum
    ;
    IN NS nsa.v-dt.com IN NS nsb.v-dt.com IN A 209.216.123.13 ; MX ;@ORIGIN v-dt.com. IN MX 5 nsa IN MX 10 nsb ; Do Timely, Inc. fw IN A 209.216.123.12 nsa IN A 209.216.123.13 IN MX 10 nsa.v-dt.com. www IN CNAME nsa.v-dt.com. yamashou IN CNAME nsa.v-dt.com. nsb IN A 209.216.123.14 IN MX 10 nsb.v-dt.com. localhost IN A 127.0.0.1


    $TTL 86400
    ;@ORIGIN SUB128.221.224.202.in-addr.arpa.
    @       IN      SOA     nsa.v-dt.com. admin.nsa.v-dt.com.  (
                                    200108283       ; Serial
                                    3600    ; Refresh
                                    900     ; Retry
                                    3600000 ; Expire
                                    3600 )  ; Minimum
    ;
            IN      NS      209.216.123.13
            IN      NS      209.216.123.14
    ; Do Timely, Inc.
    129             IN      PTR     fw.v-dt.com.
    130             IN      PTR     nsa.v-dt.com.
    131             IN      PTR     nsb.v-dt.com.
    

    Your configuration files. The named.root file is common file and do not be changed. It is required to search hostname and IP address which are not of your network. The named.conf file includes the details about your networks. The sample format which is used in our network is listed below.






  • Back to main page


    Copyright © 2003-2016 The UnixCities.com
    All rights reserved