This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
финальная_настройка_dns_сервера [2016/12/28 12:14] val [Настройки DNS клиентов] |
финальная_настройка_dns_сервера [2024/12/26 08:41] (current) val [Настройка зоны corpX.un] |
||
---|---|---|---|
Line 2: | Line 2: | ||
===== Настройка сервиса ===== | ===== Настройка сервиса ===== | ||
- | ==== Ubuntu ==== | + | |
+ | ==== Debian/Ubuntu ==== | ||
<code> | <code> | ||
root@server:~# apt install bind9 | root@server:~# apt install bind9 | ||
Line 16: | Line 17: | ||
172.16.1.254; | 172.16.1.254; | ||
}; | }; | ||
+ | empty-zones-enable no; | ||
}; | }; | ||
Line 36: | Line 38: | ||
}; | }; | ||
}; | }; | ||
- | </code><code> | ||
- | root@server:~# cd /etc/bind/ | ||
</code> | </code> | ||
- | ==== FreeBSD ==== | ||
- | <code> | ||
- | [server:~] # pkg install bind99 | ||
- | [server:~] # cat /usr/local/etc/namedb/named.conf | + | ==== Настройка зоны corpX.un ==== |
- | </code><code> | + | |
- | options { | + | |
- | directory "/usr/local/etc/namedb/working"; | + | |
- | pid-file "/var/run/named/pid"; | + | |
- | + | ||
- | allow-recursion { any; }; | + | |
- | + | ||
- | forwarders { | + | |
- | 172.16.1.254; | + | |
- | }; | + | |
- | }; | + | |
- | + | ||
- | view "inside" { | + | |
- | match-clients { | + | |
- | // 192.168.X/24; | + | |
- | // 127/8; | + | |
- | 0/0; | + | |
- | }; | + | |
- | zone "corpX.un" { | + | |
- | type master; | + | |
- | file "/usr/local/etc/namedb/master/corpX.un"; | + | |
- | }; | + | |
- | }; | + | |
- | view "outside" { | + | |
- | zone "corpX.un" { | + | |
- | type master; | + | |
- | file "/usr/local/etc/namedb/master/corpX.un.out"; | + | |
- | }; | + | |
- | }; | + | |
- | </code><code> | + | |
- | [server:~] # cd /usr/local/etc/namedb/master/ | + | |
- | </code> | + | |
- | + | ||
- | ==== FreeBSD/Ubuntu ==== | + | |
<code> | <code> | ||
- | server# cat corpX.un | + | server# cat /etc/bind/corpX.un |
</code><code> | </code><code> | ||
$TTL 3h | $TTL 3h | ||
Line 104: | Line 67: | ||
;gate A 192.168.X.254 | ;gate A 192.168.X.254 | ||
- | ;_sip._udp SRV 00 00 5060 server | + | ;_sip._udp SRV 0 0 5060 server |
+ | |||
+ | ;_xmpp-client._tcp SRV 0 0 5222 server | ||
;_kerberos._udp SRV 01 00 88 server | ;_kerberos._udp SRV 01 00 88 server | ||
;_kerberos._tcp SRV 01 00 88 server | ;_kerberos._tcp SRV 01 00 88 server | ||
;_kerberos TXT CORPX.UN | ;_kerberos TXT CORPX.UN | ||
+ | |||
+ | ;$GENERATE 1-100 node$ A 192.168.X.$ | ||
+ | ;$GENERATE 1-9 node$ A 192.168.X.20$ | ||
+ | ;$GENERATE 10-54 node$ A 192.168.X.2$ | ||
+ | ;$GENERATE 1-9 kube$ A 192.168.X.22$ | ||
</code><code> | </code><code> | ||
server# cat corpX.un.out | server# cat corpX.un.out | ||
Line 126: | Line 96: | ||
;_sip._udp SRV 00 00 6050 server | ;_sip._udp SRV 00 00 6050 server | ||
- | </code><code> | + | </code> |
+ | |||
+ | ===== Тестирование сервиса ===== | ||
+ | |||
+ | <code> | ||
server# named-checkconf -z | server# named-checkconf -z | ||
</code> | </code> | ||
Line 143: | Line 117: | ||
</code> | </code> | ||
- | ==== Ubuntu ==== | + | ==== Debian/Ubuntu ==== |
<code> | <code> | ||
root@server:~# service bind9 restart | root@server:~# service bind9 restart | ||
+ | |||
+ | debian11# service named restart | ||
</code> | </code> | ||
Line 199: | Line 175: | ||
corp12 NS ns12 | corp12 NS ns12 | ||
... | ... | ||
+ | </code> | ||
+ | |||
+ | ==== FreeBSD ==== | ||
+ | <code> | ||
+ | [server:~] # pkg install bind99 | ||
+ | |||
+ | [server:~] # cat /usr/local/etc/namedb/named.conf | ||
+ | </code><code> | ||
+ | options { | ||
+ | directory "/usr/local/etc/namedb/working"; | ||
+ | pid-file "/var/run/named/pid"; | ||
+ | |||
+ | allow-recursion { any; }; | ||
+ | | ||
+ | forwarders { | ||
+ | 172.16.1.254; | ||
+ | }; | ||
+ | }; | ||
+ | |||
+ | view "inside" { | ||
+ | match-clients { | ||
+ | // 192.168.X/24; | ||
+ | // 127/8; | ||
+ | 0/0; | ||
+ | }; | ||
+ | zone "corpX.un" { | ||
+ | type master; | ||
+ | file "/usr/local/etc/namedb/master/corpX.un"; | ||
+ | }; | ||
+ | }; | ||
+ | |||
+ | view "outside" { | ||
+ | zone "corpX.un" { | ||
+ | type master; | ||
+ | file "/usr/local/etc/namedb/master/corpX.un.out"; | ||
+ | }; | ||
+ | }; | ||
</code> | </code> |