This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
финальная_настройка_dns_сервера [2018/07/12 14:27] val [Debian/Ubuntu/FreeBSD] |
финальная_настройка_dns_сервера [2024/12/26 08:41] (current) val [Настройка зоны corpX.un] |
||
---|---|---|---|
Line 17: | Line 17: | ||
172.16.1.254; | 172.16.1.254; | ||
}; | }; | ||
+ | empty-zones-enable no; | ||
}; | }; | ||
Line 37: | 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> | + | |
- | + | ||
- | ==== Debian/Ubuntu/FreeBSD ==== | + | |
<code> | <code> | ||
- | server# cat corpX.un | + | server# cat /etc/bind/corpX.un |
</code><code> | </code><code> | ||
$TTL 3h | $TTL 3h | ||
Line 113: | Line 74: | ||
;_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 154: | Line 120: | ||
<code> | <code> | ||
root@server:~# service bind9 restart | root@server:~# service bind9 restart | ||
+ | |||
+ | debian11# service named restart | ||
</code> | </code> | ||
Line 207: | 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> |