mprov-ng / mprov_jobserver

The heart and soul of mProv. The mprov jobserver is the background work horse that handles all the heavy lifting.
Apache License 2.0
2 stars 1 forks source link

MODULE: dnsmasq #17

Closed jhujasonw closed 2 years ago

jhujasonw commented 2 years ago

A module to generate dnsmasq config for all the dns, dhcp, and pxe related things. This jobmodule should be able to consume all the dns/dhcp/pxe related jobs and regenerate/modify the configuration accordingly. If this can be done, it obsoletes #5 , #6 and #14

jhujasonw commented 2 years ago

https://gist.github.com/robinsmidsrod/2234639 - useful information and scripts for iPXE https://thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html - manpage of dnsmasq https://forum.ipxe.org/showthread.php?tid=6077 - information on how to chainload iPXE

jhujasonw commented 2 years ago

dnsmasq options of interest: -h, --no-hosts Don't read the hostnames in /etc/hosts.

-H, --addn-hosts= Additional hosts file. Read the specified file as well as /etc/hosts. If --no-hosts is given, read only the specified file. This option may be repeated for more than one additional hosts file. If a directory is given, then read all the files contained in that directory in alphabetical order.

--hostsdir= Read all the hosts files contained in the directory. New or changed files are read automatically. See --dhcp-hostsdir for details.

-i, --interface= Listen only on the specified interface(s). Dnsmasq automatically adds the loopback (local) interface to the list of interfaces to use when the --interface option is used. If no --interface or --listen-address options are given dnsmasq listens on all available interfaces except any given in --except-interface options. On Linux, when --bind-interfaces or --bind-dynamic are in effect, IP alias interface labels (eg "eth1:0") are checked, rather than interface names. In the degenerate case when an interface has one address, this amounts to the same thing but when an interface has multiple addresses it allows control over which of those addresses are accepted. The same effect is achievable in default mode by using --listen-address. A simple wildcard, consisting of a trailing '*', can be used in --interface and --except-interface options.

--local-service Accept DNS queries only from hosts whose address is on a local subnet, ie a subnet for which an interface exists on the server. This option only has effect if there are no --interface, --except-interface, --listen-address or --auth-server options. It is intended to be set as a default on installation, to allow unconfigured installations to be useful but also safe from being used for DNS amplification attacks.

-D, --domain-needed Tells dnsmasq to never forward A or AAAA queries for plain names, without dots or domain parts, to upstream nameservers. If the name is not known from /etc/hosts or DHCP then a "not found" answer is returned.

--host-record=[,....],[],[][,] (see man page)

--auth-zone=[,[/][,[/].....][,exclude:[/]].....] (see manpage)

-F, --dhcp-range (see man page)

-G, --dhcp-host=[][,id:|*][,set:][tag:][,][,][,][,ignore] ( see man page)

--dhcp-hostsfile= Read DHCP host information from the specified file. If a directory is given, then read all the files contained in that directory in alphabetical order. The file contains information about one host per line. The format of a line is the same as text to the right of '=' in --dhcp-host. The advantage of storing DHCP host information in this file is that it can be changed without re-starting dnsmasq: the file will be re-read when dnsmasq receives SIGHUP. --dhcp-optsfile= Read DHCP option information from the specified file. If a directory is given, then read all the files contained in that directory in alphabetical order. The advantage of using this option is the same as for --dhcp-hostsfile: the --dhcp-optsfile will be re-read when dnsmasq receives SIGHUP. Note that it is possible to encode the information in a --dhcp-boot flag as DHCP options, using the options names bootfile-name, server-ip-address and tftp-server. This allows these to be included in a --dhcp-optsfile. --dhcp-hostsdir= This is equivalent to --dhcp-hostsfile, except for the following. The path MUST be a directory, and not an individual file. Changed or new files within the directory are read automatically, without the need to send SIGHUP. If a file is deleted or changed after it has been read by dnsmasq, then the host record it contained will remain until dnsmasq receives a SIGHUP, or is restarted; ie host records are only added dynamically. The order in which the files in a directory are read is not defined. --dhcp-optsdir= This is equivalent to --dhcp-optsfile, with the differences noted for --dhcp-hostsdir.

-s, --domain=[,

[,local]] (see manpage)

--enable-tftp[=[,]]