Explorer les Livres électroniques
Catégories
Explorer les Livres audio
Catégories
Explorer les Magazines
Catégories
Explorer les Documents
Catégories
# vi /etc/named.conf
//
// named.conf
//
// Provided by Red Hat bind package to configure th
// server as a caching only nameserver (as a localh
//
// See /usr/share/doc/bind*/sample/ for example nam
//
options {
// On indique à bind d’écouter sur l’adress
// de loopbak
listen-on port 53 { 127.0.0.1; 192.168.0.1
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump
statistics-file "/var/named/data/named_stat
memstatistics-file "/var/named/data/named_m
// On indique à Bind de répondre aux requêt
// du réseau local
allow-query { localhost; 192.168.0.0/24
// On indique à Bind d’envoyer la demande a
// pas l’information demandée
forwarders { 8.8.8.8; 8.8.4.4; };
/*
- If you are building an AUTHORITATIVE DNS
- If you are building a RECURSIVE (caching
- If your recursive DNS server has a public
control to limit queries to your legitima
cause your server to become part of large
attacks. Implementing BCP38 within your n
reduce such attack surface
*/
recursion yes;
dnssec-enable yes;
dnssec-validation yes;
managed-keys-directory "/var/named/dynamic
pid-file "/run/named/named.pid";
session-keyfile "/run/named/session.key";
// On indique que le version de Bind ne soi
// risques d’attaques
version none;
;
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
zone "." IN {
type hint;
file "named.ca";
};
zone "mon-domaine.fr" IN {
type master;
file "/var/named/mon-domaine.fr.zone";
allow-update { none; };
};
zone "0.168.192.in-addr.arpa" IN {
type master;
file "/var/named/mon-domaine.fr.reverse";
allow-update { none; };
;
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
# vi /var/named/mon-domaine.fr.zone
$TTL 3600
@ IN SOA srv1.mon-domaine.fr. root.m
2016071901 ; Serial
3600 ; Refresh
600 ; Retry
86400 ; Expire
600 ) ; Negative
;
@ IN NS srv1.mon-domaine.fr.
@ IN MX 10 srv1.mon-domaine.fr.
srv1 IN A 192.168.0.1
srv2 IN A 192.168.0.2
# vi /var/named/mon-domaine.fr.reverse
$TTL 3600
@ IN SOA srv1.mon-domaine.fr. root.m
2016071901 ; Seri
3600 ; Ref
600 ; Ret
86400 ; Expi
600 ) ; Nega
;
@ IN NS srv1.mon-domaine.f
@ IN PTR mon-domaine.fr.
centos IN A 192.168.0.1
1 IN PTR srv1.mon-domaine.f
2 IN PTR srv2.mon-domaine.f
# named-checkconf -z
et
Si tout est bon, nous pouvons lancer le service Bind via les
commandes suivantes :
# vi /etc/sysconfig/network-scripts/ifcfg-XXXX
TYPE="Ethernet"
BOOTPROTO="none"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_FAILURE_FATAL="no"
NAME="eno16777736"
UUID="d3f499e2-8908-4464-ba1b-4243c8c011c1"
DEVICE="eno16777736"
ONBOOT="yes"
IPADDR="192.168.0.1"
PREFIX="16"
GATEWAY="192.168.0.254"
DNS1="192.168.0.1"
SEARCH="mon-domaine.fr"
IPV6_PEERDNS="yes"
IPV6_PEERROUTES="yes"
IPV6_PRIVACY="no"
# host -t MX mon-domaine.fr
Résultat :
# dig -x 192.168.0.1
Résultat :
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;1.0.168.192.in-addr.arpa. IN PTR
;; AUTHORITY SECTION:
0.168.192.in-addr.arpa. 600 IN SOA srv1.mon-domaine
# nslookup srv1.mon-domaine.fr
Résultat :
Server: 192.168.0.1
address: 192.168.0.1#53
Name: srv1.mon-domaine.fr
Address: 192.168.0.1
AJOUTER UN COMMENTAIRE
Commentaire
Nom *
Adresse de messagerie *
Site web
Laisser un commentaire