Translate

пʼятниця, 4 жовтня 2013 р.

Настройка DNS сервера для нашей сети.

Настройка Forward Lookup Zone

(/etc/bind/db.office.local)

$TTL 2d
office.local.    IN     SOA     ns1.office.local. hostmaster.office.local. (
                             2010122201 ; se = serial number
                             6h         ; ref = refresh
                             15m        ; ret = update retry
                             3w         ; ex = expiry
                             3h         ; min = minimum
                             )
              IN     NS      ns1.office.local.
              IN     NS      ns2.office.local.
              IN     MX  10  mail.office.local.
              IN     A       192.168.17.251 #DHCP server
; hosts
gw1           IN     A       192.168.17.1
ns1           IN     A       192.168.17.2
ns2           IN     A       192.168.17.3

Настраиваем Reverse Lookup Zone

/etc/bind/db.17.168.192

$ORIGIN .
$TTL 2d
17.168.192.IN-ADDR.ARPA      IN   SOA   ns1.office.local. hostmaster.office.local. (
                             2010122201 ; se = serial number
                             6h         ; ref = refresh
                             15m        ; ret = update retry
                             3w         ; ex = expiry
                             3h         ; min = minimum
                             )
              IN     NS      ns1.office.local.
              IN     NS      ns2.office.local.
$ORIGIN 17.168.192.IN-ADDR.ARPA.
1             IN     PTR     gw1.office.local.
2             IN     PTR     ns1.office.local.
3             IN     PTR     ns2.office.local.


Добавляем зоны в DNS сервер

/etc/bind/named.conf.local

//
// Do any local configuration here
//

zone "office.local" IN {
       type master;
       file "/etc/bind/db.office.local";
};

zone "17.168.192.IN-ADDR.ARPA" IN {
       type master;
       file "/etc/bind/db.17.168.192";
};

// Consider adding the 1918 zones here, if they are not
// used in your organization
include "/etc/bind/zones.rfc1918";

Форвардинг на другие DNS сервера.

/etc/bind/named.conf.forward

zone "corp.local" IN {
       type forward;
       forwarders { 192.168.11.2; 192.168.11.3; };
};
zone "11.168.192.IN-ADDR.ARPA" IN {
       type forward;
       forwarders { 192.168.11.2; 192.168.11.3; };
};

Добавляем в /etc/bind/named.conf

include "/etc/bind/named.conf.forward";

/etc/init.d/bind9 reload


Форвардинг к IPS DNS серверам.

/etc/bind/named.conf.options 
// forwarders {
//      0.0.0.0;
// };
forwarders {
        192.168.123.123;    # ns1.your-isp.net
        192.168.321.321;    # ns2.your-isp.net
};

Конфигурация клиента.

/etc/resolv.conf

search office.local
nameserver 192.168.17.253

Немає коментарів:

Дописати коментар