From a1101a65c7702af255c92a0d5d855f2ffc58057b Mon Sep 17 00:00:00 2001 From: Joseph Hanson Date: Tue, 30 Apr 2024 14:17:33 -0500 Subject: [PATCH] DNSMasq for PXE boot. DHCP Proxy should merge requests with main server. --- nixos/telperion/configuration.nix | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/nixos/telperion/configuration.nix b/nixos/telperion/configuration.nix index 755500a..cb64ba7 100644 --- a/nixos/telperion/configuration.nix +++ b/nixos/telperion/configuration.nix @@ -62,9 +62,25 @@ extraConfig = import ./config/bind.nix {inherit config;}; }; - # TFTP Server for pushing the files for PXE booting - services.tftpd = { + services.dnsmasq = { enable = true; + resolveLocalQueries = false; + settings = { + dhcp-range = [ "10.1.1.1,proxy,255.255.255.0" ]; + enable-tftp = true; + tftp-root="/srv/tftp"; + # if request comes from older PXE ROM, chainload to iPXE (via TFTP) + pxe-service='' + tag:#ipxe,x86PC,"PXE chainload to iPXE",undionly.kpxe" + tag:ipxe,0,matchbox,http://10.1.1.57:8080/boot.ipxe + ''; + # if request comes from iPXE user class, set tag "ipxe" + dhcp-userclass="set:ipxe,iPXE"; + # point ipxe tagged requests to the matchbox iPXE boot script (via HTTP) + # pxe-service="tag:ipxe,0,matchbox,http://10.1.1.57:8080/boot.ipxe"; + log-queries = true; + log-dhcp = true; + }; }; # Matchbox Server for PXE booting via device profiles