Question : Need to make  basic name server ASAP in Mac OS X 10.4

alrighty, background is as follows.  a while back we had a MAC OS X 10.4 server that did almost nothing, except act as a basic name server telling the world where our e-mail server could be found.  this unit had a hard drive replaced out of necessity and we no longer have anyone on staff that knows how to put it back to it's old state.  we were able to get it's old static IP address back in and also able to re-create the necessary "named.conf" file and a basic BIND setup.

no-one left on staff is knowlegable in MAC OS X let alone the Free BSD that it is based on.  what we need to re-create is an appropriate "named.conf" configuration et al that tells the world where to find our website (not important as it is non-existent) and our email server.  right now getting any email is a crap-shoot as is sending.

keep in mind that I am new to the UNIX/FreeBSD stuff.  not entirely stupid but close enough to make it un-bearable to some.

TIA
CASHCOMP

Answer : Need to make  basic name server ASAP in Mac OS X 10.4

Ok, well this is what a standard OSX named.conf looks like:

//
// Include keys file
//
include "/etc/rndc.key";

// Declares control channels to be used by the rndc utility.
//
// It is recommended that 127.0.0.1 be the only address used.
// This also allows non-privileged users on the local host to manage
// your name server.

//
// Default controls
//
controls {
        inet 127.0.0.1 port 54 allow {any;}
        keys { "rndc-key"; };
};

options {
        directory "/var/named";
        /*
         * 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
//
zone "." IN {
        type hint;
        file "named.ca";
};

zone "localhost" IN {
        type master;
        file "localhost.zone";
        allow-update { none; };
};

zone "0.0.127.in-addr.arpa" IN {
        type master;
        file "named.local";
        allow-update { none; };
};

logging {
        category default {
                _default_log;
        };

        channel _default_log  {
                file "/Library/Logs/named.log";
                severity info;
                print-time yes;
        };
};

And in that file you want to add a section in the zones bit for your domain, which looks like this:

zone "yourdomain.com" IN {
        type master;
        file "yourdomain.com.zone";
        allow-update { none; };
};

Then create a file called /var/named/yourdomain.com.zone and put this in it:

$TTL 86400

@       IN      SOA     dns.yourdomain.com.      your.email.com. (
                        2007012201      ; serial number YYMMDDNN
                        28800           ; Refresh
                        7200            ; Retry
                        864000          ; Expire
                        86400           ; Min TTL
                  )

                NS      dns.yourdomain.com.

                MX      10 mail.yourdomain.com.


$ORIGIN yourdomain.com.

dns           IN     A     123.123.123.123 ; your OSX server IP address, or the public IP if you're behind a NAT router
mail          IN     A     123.123.123.123 ; your mail server addess, or again, the public IP if behind NAT

Restart your dns and all should be good.
Random Solutions  
 
programming4us programming4us