Mudanças entre as edições de "DNS"
De IFRS Campus Canoas
| Linha 55: | Linha 55: | ||
Arquivo /etc/bind/zonas/exemplo.ifrs.edu.br.rev | Arquivo /etc/bind/zonas/exemplo.ifrs.edu.br.rev | ||
| − | ;$ORIGIN | + | ;$ORIGIN 2.0.192.in-addr.arpa. |
$TTL 86400 | $TTL 86400 | ||
@ IN SOA dns1.exemplo.ifrs.edu.br. admin.exemplo.ifrs.edu.br. ( | @ IN SOA dns1.exemplo.ifrs.edu.br. admin.exemplo.ifrs.edu.br. ( | ||
Edição das 17h05min de 11 de abril de 2016
Índice
Servidor de DNS
Neste tutorial será mostrado como montar um servidor de DNS autoritativo e recursivo no mesmo servidor respeitando regras de acesso utilizando views. Também será criada uma zona fictícia exemplo.ifrs.edu.br com sua respectiva zona reversa em IPv4 e IPv6 para receber consultas externas.
Informações iniciais
Domínio: exemplo.ifrs.edu.br
IPv4: 192.0.2.4
IPv6: 2001:0DB8::4
Hostname: dns1.exemplo.ifrs.edu.br
S.O.: Debian 8 (Jessie)
Versão BIND: 9.9.5-9
Instalação do BIND
# apt-get install bind9 -y
Configuração
Editar o arquivo de configuração /etc/bind/named.conf.options
options {
directory "/var/cache/bind";
statistics-file "/var/log/bind/named.stats";
memstatistics-file "/var/log/bind/mem.stats";
dnssec-enable yes;
dnssec-validation auto;
auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
version "named";
};
Zona exemplo.ifrs.edu.br
Arquivo /etc/bind/zonas/exemplo.ifrs.edu.br
$TTL 86400
@ IN SOA dns1.exemplo.ifrs.edu.br. admin.exemplo.ifrs.edu.br. (
2016040601 ; Serial
3H ; Refresh
1H ; Retry
1W ; Expire
1D) ; Minimum TTL
; Servidores DNS
@ IN NS dns1.exemplo.ifrs.edu.br.
;
dns1 IN A 192.0.2.4
dns1 IN AAAA 2001:0DB8::4
Zonas reversa IPv4
Arquivo /etc/bind/zonas/exemplo.ifrs.edu.br.rev
;$ORIGIN 2.0.192.in-addr.arpa.
$TTL 86400
@ IN SOA dns1.exemplo.ifrs.edu.br. admin.exemplo.ifrs.edu.br. (
2016030501 ;Serial
3H ; Refresh
1H ; Retry
1W ; Expire
1D) ; Minimum TTL
; Servidores DNS
@ IN NS dns1.exemplo.ifrs.edu.br.