Friday, October 2, 2009

Linux DNS Server

vi /etc/named.conf

// Default named.conf generated by install of bind-9.2.4-30.el4_7.2
options {
listen-on { 192.168.10.6; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";

forwarders {
20.162.8.22;
15.1.8.8; };
};

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

zone "10.168.192.in-addr.arpa"
{
type master;
file "/var/named/192.168.10.rev";
};

vi /var/named/192.168.10.rev

$ttl 38400
10.168.192.in-addr.arpa. IN SOA routerx.mydomain.com. routerx.mydomain.com. (
1246338296
10800
3600
604800
38400 )
10.168.192.in-addr.arpa. IN NS routerx.mydomain.com.
6.10.168.192.in-addr.arpa. IN PTR routerx.mydomain.com.

vi /var/named/mydomain.com.hosts

$ttl 38400
mydomain.com. IN SOA routerx.mydomain.com. routerx.mydomain.com (
1246337929
10800
3600
604800
38400 )
mydomain.com. IN NS routerx.mydomain.com.
routerx.mydomain.com. IN A 192.168.10.6

No comments: