User Tools

Site Tools


dnsmasq

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
dnsmasq [2026/09/07 13:47] – created reddydnsmasq [2026/09/07 14:21] (current) – [For PXE boot] reddy
Line 17: Line 17:
 #no-hosts  # To skip /etc/hosts #no-hosts  # To skip /etc/hosts
 #addn-hosts=  # To use a different file than /etc/hosts #addn-hosts=  # To use a different file than /etc/hosts
 +
 +#bind-interfaces  # Listen to specific interface, not all
 +#listen-address=127.0.0.1  # Interface address on which to listen
 </code> </code>
 +
 +==== For DHCP ====
 +
 +<code>
 +dhcp-range=192.168.0.1,192.168.0.10,12h  # Range and lease time
 +dhcp-option=3,192.168.0.254  # Router
 +dhcp-host=the-mac-address,ip-address  # For fixed IPs
 +# See /var/lib/misc/dnsmasq.leases
 +</code>
 +
 +==== For tftp ====
 +<code>
 +enable-tftp
 +tftp-root=/var/mytftp
 +#tftp-no-fail  # If tftp-root is unavailable, dont fail
 +#tftp-secure  # Serve only files owned by the user dnsmasq is running as
 +</code>
 +
 +# tftp commands
 +# connect 127.0.0.1
 +# get filename
 +# quit
 +# put filename
 +
 +==== For PXE boot ====
 +
 +<code>
 +interface=_  # Get from ifconfig or "networkctl list"
 +dhcp-range=_
 +dhcp-boot=pxelinux.0  # This is a symbolic link for debian-installer
 +enable-tftp
 +tftp-root=_
 +
 +bogus-priv
 +expand-hosts
 +no-resol
 +server=8.8.8.8
 +</code>
 +
 +In the TFTP root directory, download the TGZ (netboot.tar.gz for Debian) and extract.
 +
 +Use a bridged adapter, if dnsmasq is running on a VM.
dnsmasq.1788781676.txt.gz · Last modified: by reddy

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki