Documentation du Dr FRAPPE

Ce wiki regroupe les résultats de mes expériences en informatique accumulés au cours de mes recherches sur le net.

Dans la mesure du possible, j'ai cité mes sources ; il en manque certainement… :-)

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
Prochaine révisionLes deux révisions suivantes
logiciel:internet:dnsmasq:dnsmasq.conf [2020/11/05 20:20] – [Options] adminlogiciel:internet:dnsmasq:dnsmasq.conf [2020/11/06 10:43] – [Options] admin
Ligne 239: Ligne 239:
     ? dhcp-option=vendor:Etherboot,60,"Etherboot"     ? dhcp-option=vendor:Etherboot,60,"Etherboot"
     : Send the Encapsulated-vendor-class ID needed by some configurations of Etherboot to allow is to recognise the DHCP server.     : Send the Encapsulated-vendor-class ID needed by some configurations of Etherboot to allow is to recognise the DHCP server.
-  +    dhcp-option-force 
- +    : 
-Send options to PXELinux. Note that we need to send the options even +      ? dhcp-option-force=208,f1:00:74:7e 
-though they don't appear in the parameter request list, so we need +      : Send options to PXELinux. Note that we need to send the options even though they don't appear in the parameter request list, so we need to use dhcp-option-force here. See http://syslinux.zytor.com/pxe.php#special for details. Magic number - needed before anything else is recognised 
-to use dhcp-option-force here. +      ? dhcp-option-force=209,configs/common 
-See http://syslinux.zytor.com/pxe.php#special for details. +      : Configuration file name 
-Magic number - needed before anything else is recognised +      ? dhcp-option-force=210,/tftpboot/pxelinux/files/ 
-#dhcp-option-force=208,f1:00:74:7e +      : Path prefix 
-Configuration file name +      ? dhcp-option-force=211,30i 
-#dhcp-option-force=209,configs/common +      : Reboot time. (Note 'i' to send 32-bit value) 
-Path prefix +    ? dhcp-boot 
-#dhcp-option-force=210,/tftpboot/pxelinux/files/ +    : 
-Reboot time. (Note 'i' to send 32-bit value) +      ? dhcp-boot=pxelinux.0 
-#dhcp-option-force=211,30i +      : Set the boot filename for netboot/PXE. You will only need this if you want to boot machines over the network and you will need a TFTP server; either dnsmasq's built-in TFTP server or an external one. (See below for how to enable the TFTP server.) 
- +      ? dhcp-boot=pxelinux,server.name,192.168.1.100 
-Set the boot filename for netboot/PXE. You will only need +      : The same as above, but use custom tftp-server instead machine running dnsmasq 
-this if you want to boot machines over the network and you will need +      ? Boot for iPXE 
-a TFTP server; either dnsmasq's built-in TFTP server or an +      : The idea is to send two different filenames, the first loads iPXE, and the second tells iPXE what to load. The dhcp-match sets the ipxe tag for requests from iPXE. 
-external one. (See below for how to enable the TFTP server.) +        ? dhcp-boot=undionly.kpxe 
-#dhcp-boot=pxelinux.0 +        : 
- +        ? dhcp-match=set:ipxe,175 # iPXE sends a 175 option. 
-The same as above, but use custom tftp-server instead machine running dnsmasq +        : 
-#dhcp-boot=pxelinux,server.name,192.168.1.100 +        ? dhcp-boot=tag:ipxe,http://boot.ipxe.org/demo/boot.php 
- +        : 
-Boot for iPXEThe idea is to send two different +    ? Encapsulated options for iPXE. 
-filenames, the first loads iPXE, and the second tells iPXE what to +    : All the options are encapsulated within option 175 
-load. The dhcp-match sets the ipxe tag for requests from iPXE. +      ? dhcp-option=encap:175, 1, 5b 
-#dhcp-boot=undionly.kpxe +      : priority code 
-#dhcp-match=set:ipxe,175 # iPXE sends a 175 option. +      ? dhcp-option=encap:175, 176, 1b 
-#dhcp-boot=tag:ipxe,http://boot.ipxe.org/demo/boot.php +      : no-proxydhcp 
- +      ? dhcp-option=encap:175, 177, string 
-Encapsulated options for iPXE. All the options are +      : bus-id 
-encapsulated within option 175 +      ? dhcp-option=encap:175, 189, 1b 
-#dhcp-option=encap:175, 1, 5b         # priority code +      : BIOS drive code 
-#dhcp-option=encap:175, 176, 1b       # no-proxydhcp +      ? dhcp-option=encap:175, 190, user 
-#dhcp-option=encap:175, 177, string   # bus-id +      : iSCSI username 
-#dhcp-option=encap:175, 189, 1b       # BIOS drive code +      ? dhcp-option=encap:175, 191, pass 
-#dhcp-option=encap:175, 190, user     # iSCSI username +      : iSCSI password 
-#dhcp-option=encap:175, 191, pass     # iSCSI password +  ? dhcp-match 
- +  : Test for the architecture of a netboot client. 
-Test for the architecture of a netboot client. PXE clients are +  : PXE clients are supposed to send their architecture as option 93. (See RFC 4578) 
-supposed to send their architecture as option 93. (See RFC 4578) +    ? dhcp-match=peecees, option:client-arch, 0 #x86-32 
-#dhcp-match=peecees, option:client-arch, 0 #x86-32 +    ? dhcp-match=itanics, option:client-arch, 2 #IA64 
-#dhcp-match=itanics, option:client-arch, 2 #IA64 +    ? dhcp-match=hammers, option:client-arch, 6 #x86-64 
-#dhcp-match=hammers, option:client-arch, 6 #x86-64 +    ? dhcp-match=mactels, option:client-arch, 7 #EFI x86-64 
-#dhcp-match=mactels, option:client-arch, 7 #EFI x86-64 +  ? pxe-prompt 
- +  :  
-Do real PXE, rather than just booting a single file, this is an +    ? pxe-prompt="What system shall I netboot?" 
-alternative to dhcp-boot. +    : Do real PXE, rather than just booting a single file, this is an alternative to dhcp-boot. 
-#pxe-prompt="What system shall I netboot?+    ? pxe-prompt="Press F8 for menu.", 60 
-or with timeout before first available action is taken: +    : or with timeout before first available action is taken: 
-#pxe-prompt="Press F8 for menu.", 60 +  ? pxe-service 
- +  : 
-Available boot services. for PXE. +    ? pxe-service=x86PC, "Boot from local disk
-#pxe-service=x86PC, "Boot from local disk+    : Available boot services. for PXE. 
- +    ? pxe-service=x86PC, "Install Linux", pxelinux 
-Loads <tftp-root>/pxelinux.0 from dnsmasq TFTP server. +    : Loads <tftp-root>/pxelinux.0 from dnsmasq TFTP server. 
-#pxe-service=x86PC, "Install Linux", pxelinux +    ? pxe-service=x86PC, "Install Linux", pxelinux, 1.2.3.4 
- +    : Loads <tftp-root>/pxelinux.0 from TFTP server at 1.2.3.4. 
-Loads <tftp-root>/pxelinux.0 from TFTP server at 1.2.3.4. +    : Beware this fails on old PXE ROMS. 
-Beware this fails on old PXE ROMS. +    ? pxe-service=x86PC, "Install windows from RIS server", 1 
-#pxe-service=x86PC, "Install Linux", pxelinux, 1.2.3.4 +    : Use bootserver on network, found my multicast or broadcast. 
- +    ? pxe-service=x86PC, "Install windows from RIS server", 1, 1.2.3.4 
-Use bootserver on network, found my multicast or broadcast. +    : Use bootserver at a known IP address. 
-#pxe-service=x86PC, "Install windows from RIS server",+  ? multicast-FTP 
- +  : If you have multicast-FTP available, information for that can be passed in a similar way using options 1 to 5. See page 19 of http://download.intel.com/design/archives/wfm/downloads/pxespec.pdf 
-Use bootserver at a known IP address. +    ? enable-tftp 
-#pxe-service=x86PC, "Install windows from RIS server", 1, 1.2.3.4 +    : Enable dnsmasq's built-in TFTP server 
- +    ? tftp-root=/var/ftpd 
-If you have multicast-FTP available, +    : Set the root directory for files available via FTP. 
-information for that can be passed in a similar way using options 1 +    ? tftp-no-fail 
-to 5. See page 19 of +    : Do not abort if the tftp-root is unavailable 
-http://download.intel.com/design/archives/wfm/downloads/pxespec.pdf +    ? tftp-secure 
- +    : Make the TFTP server more secure: with this set, only files owned by the user dnsmasq is running as will be send over the net. 
- +    ? tftp-no-blocksize 
-Enable dnsmasq's built-in TFTP server +    : This option stops dnsmasq from negotiating a larger blocksize for TFTP transfers. It will slow things down, but may rescue some broken TFTP clients. 
-#enable-tftp +  ? dhcp-boot 
- +  : 
-Set the root directory for files available via FTP. +    ? dhcp-boot=tag:red,pxelinux.red-net 
-#tftp-root=/var/ftpd +    : Set the boot file name only when the "red" tag is set. 
- +    ? dhcp-boot=/var/ftpd/pxelinux.0,boothost,192.168.0.3 
-Do not abort if the tftp-root is unavailable +    : An example of dhcp-boot with an external TFTP server: the name and IP address of the server are given after the filename. 
-#tftp-no-fail +    : Can fail with old PXE ROMS. Overridden by --pxe-service. 
- +    ? dhcp-boot=/var/ftpd/pxelinux.0,boothost,tftp_server_name 
-Make the TFTP server more secure: with this set, only files owned by +    : If there are multiple external tftp servers having a same name (using /etc/hosts) then that name can be specified as the tftp_servername (the third option to dhcp-boot) and in that case dnsmasq resolves this name and returns the resultant IP addresses in round robin fashion. This facility can be used to load balance the tftp load among a set of servers. 
-the user dnsmasq is running as will be send over the net. +  ? dhcp-lease 
-#tftp-secure +  :  
- +    ? dhcp-lease-max=150 
-This option stops dnsmasq from negotiating a larger blocksize for TFTP +    : Set the limit on DHCP leases, the default is 150 
-transfers. It will slow things down, but may rescue some broken TFTP +    ? dhcp-leasefile=/var/lib/misc/dnsmasq.leases 
-clients. +    : The DHCP server needs somewhere on disk to keep its lease database. 
-#tftp-no-blocksize +    : This defaults to a sane location, but if you want to change it, use the line below. 
- +  ? dhcp-authoritative 
-Set the boot file name only when the "red" tag is set. +  : Set the DHCP server to authoritative mode. In this mode it will barge in and take over the lease for any client which broadcasts on the network, whether it has a record of the lease or not. This avoids long timeouts when a machine wakes up on a new network. DO NOT enable this if there's the slightest chance that you might end up accidentally configuring a DHCP server for your campus/company accidentally. The ISC server uses the same option, and this URL provides more information: http://www.isc.org/files/auth.html 
-#dhcp-boot=tag:red,pxelinux.red-net +  ? dhcp-rapid-commit 
- +  : Set the DHCP server to enable DHCPv4 Rapid Commit Option per RFC 4039. 
-An example of dhcp-boot with an external TFTP server: the name and IP +  : In this mode it will respond to a DHCPDISCOVER message including a Rapid Commit option with a DHCPACK including a Rapid Commit option and fully committed address and configuration information. This must only be enabled if either the server is the only server for the subnet, or multiple servers are present and they each commit a binding for all clients. 
-address of the server are given after the filename. +  ? dhcp-script=/bin/echo 
-Can fail with old PXE ROMS. Overridden by --pxe-service. +  : Run an executable when a DHCP lease is created or destroyed. 
-#dhcp-boot=/var/ftpd/pxelinux.0,boothost,192.168.0.3 +  : The arguments sent to the script are "add" or "del", then the MAC address, the IP address and finally the hostname if there is one. 
- +  ? cache-size=150 
-If there are multiple external tftp servers having a same name +  : Set the cachesize here. 
-(using /etc/hosts) then that name can be specified as the +  ? no-negcache 
-tftp_servername (the third option to dhcp-boot) and in that +  : If you want to disable negative caching, uncomment this. 
-case dnsmasq resolves this name and returns the resultant IP +  ? local-ttl= 
-addresses in round robin fashion. This facility can be used to +   Normally responses which come from /etc/hosts and the DHCP lease file have Time-To-Live set as zero, which conventionally means do not cache further. If you are happy to trade lower load on the server for potentially stale date, you can set a time-to-live (in seconds) here. 
-load balance the tftp load among a set of servers. +  ? bogus-nxdomain=64.94.110.11 
-#dhcp-boot=/var/ftpd/pxelinux.0,boothost,tftp_server_name +  : If you want dnsmasq to detect attempts by Verisign to send queries to unregistered .com and .net hosts to its sitefinder service and have dnsmasq instead return the correct NXDOMAIN response, uncomment this line. You can add similar lines to do the same for other registries which have implemented wildcard A records. 
- +  ? alias 
-Set the limit on DHCP leases, the default is 150 +  : If you want to fix up DNS results from upstream servers, use the alias option. This only works for IPv4. 
-#dhcp-lease-max=150 +    ? alias=1.2.3.4,5.6.7.8 
- +    : This alias makes a result of 1.2.3.4 appear as 5.6.7.8 
-The DHCP server needs somewhere on disk to keep its lease database. +    ? alias=1.2.3.0,5.6.7.0,255.255.255.0 
-This defaults to a sane location, but if you want to change it, use +    : and this maps 1.2.3.x to 5.6.7.x 
-the line below. +    ? alias=192.168.0.10-192.168.0.40,10.0.0.0,255.255.255.0 
-#dhcp-leasefile=/var/lib/misc/dnsmasq.leases +    : and this maps 192.168.0.10->192.168.0.40 to 10.0.0.10->10.0.0.40 
- +  ? MX records 
-Set the DHCP server to authoritative mode. In this mode it will barge in +  : Change these lines if you want dnsmasq to serve MX records. 
-and take over the lease for any client which broadcasts on the network, +    ? mx-host=maildomain.com,servermachine.com,50 
-whether it has a record of the lease or not. This avoids long timeouts +    : Return an MX record named "maildomain.com" with target servermachine.com and preference 50 
-when a machine wakes up on a new network. DO NOT enable this if there's +    ? mx-target=servermachine.com 
-the slightest chance that you might end up accidentally configuring a DHCP +    : Set the default target for MX records created using the localmx option. 
-server for your campus/company accidentally. The ISC server uses +    ? localmx 
-the same option, and this URL provides more information: +    : Return an MX record pointing to the mx-target for all local machines. 
-http://www.isc.org/files/auth.html +    ? selfmx 
-#dhcp-authoritative +    : Return an MX record pointing to itself for all local machines. 
- +  ? srv-host 
-Set the DHCP server to enable DHCPv4 Rapid Commit Option per RFC 4039. +  : Change the following lines if you want dnsmasq to serve SRV records. These are useful if you want to serve ldap requests for Active Directory and other windows-originated DNS requests. 
-In this mode it will respond to a DHCPDISCOVER message including a Rapid Commit +  : See RFC 2782. 
-option with a DHCPACK including a Rapid Commit option and fully committed address +  : You may add multiple srv-host lines. 
-and configuration information. This must only be enabled if either the server is  +  : The fields are <name>,<target>,<port>,<priority>,<weight> 
-the only server for the subnet, or multiple servers are present and they each +  : If the domain part if missing from the name (so that is just has the service and protocol sections) then the domain given by the domain= config option is used. (Note that expand-hosts does not need to be set for this to work.) 
-commit a binding for all clients. +    ? srv-host=_ldap._tcp.example.com,ldapserver.example.com,389 
-#dhcp-rapid-commit +    : A SRV record sending LDAP for the example.com domain to ldapserver.example.com port 389 
- +    ? domain=example.com\\ srv-host=_ldap._tcp,ldapserver.example.com,389 
-Run an executable when a DHCP lease is created or destroyed. +    : A SRV record sending LDAP for the example.com domain to ldapserver.example.com port 389 (using domain=) 
-The arguments sent to the script are "add" or "del", +    ? srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,1\\ srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,2 
-then the MAC address, the IP address and finally the hostname +    : Two SRV records for LDAP, each with different priorities 
-if there is one. +    ? srv-host=_ldap._tcp.example.com 
-#dhcp-script=/bin/echo +    : A SRV record indicating that there is no LDAP server for the domain example.com 
- +  ? ptr-record=_http._tcp.dns-sd-services,"New Employee Page._http._tcp.dns-sd-services" 
-Set the cachesize here. +  : The following line shows how to make dnsmasq serve an arbitrary PTR record. This is useful for DNS-SD. (Note that the domain-name expansion done for SRV records _does_not occur for PTR records.) 
-#cache-size=150 +  ? txt-record 
- +  : Change the following lines to enable dnsmasq to serve TXT records. 
-If you want to disable negative caching, uncomment this. +  : These are used for things like SPF and zeroconf. (Note that the domain-name expansion done for SRV records _does_not occur for TXT records.) 
-#no-negcache +    ? txt-record=example.com,"v=spf1 a -all" 
- +    : Example SPF. 
-Normally responses which come from /etc/hosts and the DHCP lease +    ? txt-record=_http._tcp.example.com,name=value,paper=A4 
-file have Time-To-Live set as zero, which conventionally means +    : Example zeroconf 
-do not cache further. If you are happy to trade lower load on the +  ? cname=bertand,bert 
-server for potentially stale date, you can set a time-to-live (in +  : Provide an alias for a "local" DNS name. Note that this _only_ works for targets which are names from DHCP or /etc/hosts. Give host "bert" another name, bertrand 
-seconds) here. +  ? log-queries 
-#local-ttl+  : For debugging purposes, log each DNS query as it passes through dnsmasq. 
- +  ? log-dhcp 
-If you want dnsmasq to detect attempts by Verisign to send queries +  : Log lots of extra information about DHCP transactions. 
-to unregistered .com and .net hosts to its sitefinder service and +  ? conf-file=/etc/dnsmasq.more.conf 
-have dnsmasq instead return the correct NXDOMAIN response, uncomment +  ? conf-dir=/etc/dnsmasq.d 
-this line. You can add similar lines to do the same for other +  : Include another lot of configuration options.
-registries which have implemented wildcard A records. +
-#bogus-nxdomain=64.94.110.11 +
- +
-If you want to fix up DNS results from upstream servers, use the +
-alias option. This only works for IPv4. +
-This alias makes a result of 1.2.3.4 appear as 5.6.7.8 +
-#alias=1.2.3.4,5.6.7.8 +
-and this maps 1.2.3.x to 5.6.7.x +
-#alias=1.2.3.0,5.6.7.0,255.255.255.0 +
-and this maps 192.168.0.10->192.168.0.40 to 10.0.0.10->10.0.0.40 +
-#alias=192.168.0.10-192.168.0.40,10.0.0.0,255.255.255.0 +
- +
-Change these lines if you want dnsmasq to serve MX records. +
- +
-Return an MX record named "maildomain.com" with target +
-servermachine.com and preference 50 +
-#mx-host=maildomain.com,servermachine.com,50 +
- +
-Set the default target for MX records created using the localmx option. +
-#mx-target=servermachine.com +
- +
-Return an MX record pointing to the mx-target for all local +
-machines. +
-#localmx +
- +
-Return an MX record pointing to itself for all local machines. +
-#selfmx +
- +
-Change the following lines if you want dnsmasq to serve SRV +
-records.  These are useful if you want to serve ldap requests for +
-Active Directory and other windows-originated DNS requests. +
-See RFC 2782. +
-You may add multiple srv-host lines. +
-The fields are <name>,<target>,<port>,<priority>,<weight> +
-If the domain part if missing from the name (so that is just has the +
-service and protocol sections) then the domain given by the domain= +
-config option is used. (Note that expand-hosts does not need to be +
-set for this to work.) +
- +
-A SRV record sending LDAP for the example.com domain to +
-ldapserver.example.com port 389 +
-#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389 +
- +
-A SRV record sending LDAP for the example.com domain to +
-ldapserver.example.com port 389 (using domain=) +
-#domain=example.com +
-#srv-host=_ldap._tcp,ldapserver.example.com,389 +
- +
-# Two SRV records for LDAPeach with different priorities +
-#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,1 +
-#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,2 +
- +
-A SRV record indicating that there is no LDAP server for the domain +
-example.com +
-#srv-host=_ldap._tcp.example.com +
- +
-The following line shows how to make dnsmasq serve an arbitrary PTR +
-record. This is useful for DNS-SD. (Note that the +
-domain-name expansion done for SRV records _does_not +
-occur for PTR records.) +
-#ptr-record=_http._tcp.dns-sd-services,"New Employee Page._http._tcp.dns-sd-services" +
- +
-Change the following lines to enable dnsmasq to serve TXT records. +
-These are used for things like SPF and zeroconf. (Note that the +
-domain-name expansion done for SRV records _does_not +
-occur for TXT records.) +
- +
-#Example SPF. +
-#txt-record=example.com,"v=spf1 a -all" +
- +
-#Example zeroconf +
-#txt-record=_http._tcp.example.com,name=value,paper=A4 +
- +
-Provide an alias for a "local" DNS name. Note that this _only_ works +
-for targets which are names from DHCP or /etc/hosts. Give host +
-"bert" another name, bertrand +
-#cname=bertand,bert +
- +
-For debugging purposes, log each DNS query as it passes through +
-dnsmasq. +
-#log-queries +
- +
-Log lots of extra information about DHCP transactions. +
-#log-dhcp +
- +
-# Include another lot of configuration options. +
-#conf-file=/etc/dnsmasq.more.conf +
-#conf-dir=/etc/dnsmasq.d+
  
 # Include all the files in a directory except those ending in .bak # Include all the files in a directory except those ending in .bak