1
|
# Configuration file for dnsmasq.
|
2
|
|
3
|
#############
|
4
|
## Logging ##
|
5
|
#############
|
6
|
# For debugging purposes, log each DNS query as it passes through dnsmasq.
|
7
|
log-queries
|
8
|
# Log lots of extra information about DHCP transactions.
|
9
|
log-dhcp
|
10
|
# Log facility
|
11
|
# Définit la "facility" dans laquelle Dnsmasq enverra ses entrées syslog,
|
12
|
# par défaut DAEMON ou LOCAL0 si le mode debug est activé.
|
13
|
# Si la "facility" contient au moins un caractère "/", alors
|
14
|
# Dnsmasq considère qu'il s'agit d'un fichier et enverra les logs dans
|
15
|
# le fichier correspondant à la place du syslog.
|
16
|
# (Les erreurs lors de la lecture de la configuration vont toujours vers
|
17
|
# le syslog, mais tous les messages postérieures à un démarrage réussi
|
18
|
# seront exclusivement envoyés vers le fichier de logs).
|
19
|
# Lorsque Dnsmasq est configuré pour envoyer ses traces vers un
|
20
|
# fichier, la réception d'un signal SIGUSR2 entraine la fermeture et réouverture du fichier.
|
21
|
# Cela permet la rotation de fichiers de traces sans nécessiter l'arrêt de Dnsmasq.
|
22
|
log-facility=/var/log/dnsmasq.log
|
23
|
|
24
|
#################
|
25
|
## Options DNS ##
|
26
|
#################
|
27
|
# Domaine local
|
28
|
domain=%%nom_domaine_local
|
29
|
|
30
|
# If you want to disable negative ("no such domain") caching, uncomment this.
|
31
|
no-negcache
|
32
|
|
33
|
# forces dnsmasq to try each query with each server
|
34
|
# #strictly in the order they appear in /etc/resolv.conf
|
35
|
strict-order
|
36
|
|
37
|
# Set this (and domain: see below) if you want to have a domain
|
38
|
# automatically added to simple names in a hosts-file.
|
39
|
expand-hosts
|
40
|
# Uncomment this to filter useless windows-originated DNS requests
|
41
|
# which can trigger dial-on-demand links needlessly.
|
42
|
# Note that (amongst other things) this blocks all SRV requests,
|
43
|
# so don't use it if you use eg Kerberos, SIP, XMMP or Google-talk.
|
44
|
# This option only affects forwarding, SRV records originating for
|
45
|
# dnsmasq (via srv-host= lines) are not suppressed by it.
|
46
|
filterwin2k
|
47
|
|
48
|
##########
|
49
|
## DHCP ##
|
50
|
##########
|
51
|
## Options globales DHCP ##
|
52
|
dhcp-authoritative
|
53
|
# Send microsoft-specific option to tell windows to release the DHCP lease
|
54
|
# when it shuts down. Note the "i" flag, to tell dnsmasq to send the
|
55
|
# value as a four-byte integer - that's what microsoft wants. See
|
56
|
# http://technet2.microsoft.com/WindowsServer/en/library/a70f1bb7-d2d4-49f0-96d6-4b7414ecfaae1033.mspx?mfr=true
|
57
|
dhcp-option=vendor:MSFT,2,1i
|
58
|
# WINS
|
59
|
%if %%is_defined('container_ip_fichier')
|
60
|
%if %%container_ip_fichier == "127.0.0.1"
|
61
|
dhcp-option=option:netbios-ns,%%adresse_ip_eth0
|
62
|
dhcp-option=option:netbios-dd,%%adresse_ip_eth0
|
63
|
%else
|
64
|
dhcp-option=option:netbios-ns,%%adresse_ip_fichier_link
|
65
|
dhcp-option=option:netbios-dd,%%adresse_ip_fichier_link
|
66
|
%end if
|
67
|
dhcp-option=option:netbios-nodetype,8
|
68
|
%end if
|
69
|
# NTP
|
70
|
dhcp-option=option:ntp-server,%%adresse_ip_eth0
|
71
|
|
72
|
## Range DHCP ##
|
73
|
# dhcp-range=LABEL,IP_BASSE,IP_HAUTE,NETMASK,DUREE_BAIL
|
74
|
%for %%subnet_dhcp in %%adresse_network_dhcp
|
75
|
# plage %%subnet_dhcp.ip_basse_dhcp => %%subnet_dhcp.ip_haute_dhcp
|
76
|
dhcp-range=a%%subnet_dhcp.adresse_ip_gw_dhcp,%%subnet_dhcp.ip_basse_dhcp,%%subnet_dhcp.ip_haute_dhcp,%%subnet_dhcp.adresse_netmask_dhcp,12h
|
77
|
dhcp-option=net:a%%subnet_dhcp.adresse_ip_gw_dhcp,option:router,%%subnet_dhcp.adresse_ip_gw_dhcp
|
78
|
|
79
|
%end for
|
80
|
|
81
|
## PXE/TFTP ##
|
82
|
%if %%activer_tftp == 'oui'
|
83
|
#dhcp-option=66,"%%adresse_ip_tftp"
|
84
|
%if %%adresse_ip_tftp == %%adresse_ip_eth0
|
85
|
dhcp-boot=%%chemin_fichier_pxe
|
86
|
%else
|
87
|
dhcp-boot=%%chemin_fichier_pxe,pxeserver,%%adresse_ip_tftp
|
88
|
%end if
|
89
|
enable-tftp
|
90
|
tftp-root=%%repertoire_tftp
|
91
|
%end if
|
92
|
|