# # IP Engineering Rescue Disk # Copyright (C) 2017 David M. Syzdek . # # @SYZDEK_BSD_LICENSE_START@ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of David M. Syzdek nor the # names of its contributors may be used to endorse or promote products # derived from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS # IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DAVID M. SYZDEK BE LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # # @SYZDEK_BSD_LICENSE_END@ # # DNSMasq Configuration # # Configure PXE/DHCP Interface: # $ ip link set mtu 1500 dev # $ ip addr add 10.0.109.254/25 dev # $ iptables -A INPUT -i -p udp --dport bootps --sport 67:68 -j ACCEPT # $ iptables -A INPUT -i -p udp --dport bootpc --sport 67:68 -j ACCEPT # $ iptables -A INPUT -i -p udp --dport 4011 -j ACCEPT # $ iptables -A INPUT -i -p udp --dport tftp -j ACCEPT # $ iptables -A INPUT -i -p udp --dport http -j ACCEPT # $ iptables -A INPUT -i -p tcp --dport domain -j ACCEPT # $ iptables -A INPUT -i -p udp --dport domain -j ACCEPT # # Start DNSMasq: # $ dnsmasq -C /var/lib/tftpboot/dnsmasq-httpboot.conf -i # # Useful dnsmasq options: # -C file - configuration file # -h - Don't read the hostnames in /etc/hosts. # -i dev - Specify interface(s) to listen on. # -d - Debug mode: don't fork to the background # -R - Don't read /etc/resolv.conf # -n - Don't poll /etc/resolv.conf for changes. # # Setup HTTP directory: # $ mkdir -p /var/lib/www # $ ln -s /var/lib/tftpboot /var/lib/www/httpboot # # Start busybox httpd: # $ busybox httpd -p 10.0.109.254:80 -h /var/lib/www -f -vv # # Useful httpd options: # -f - don't daemonize # -v[v] - verbose # -p IP:PORT - Bind to IP:PORT (default *:80) # -h HOME - Home directory (default .) # # # Local network listen-address=10.0.109.254 domain=pxe.acsalaska.net,10.0.109.128/25 # # DNS Configuration domain-needed resolv-file=/etc/resolv.conf local=/pxe.iperd.org/ # # TFTP configuration enable-tftp tftp-root=/var/lib/tftpboot # DHCP configuration dhcp-range=10.0.109.129,10.0.109.199,255.255.255.128,10m # PXE tagging dhcp-vendorclass=BIOS,PXEClient:Arch:00000 dhcp-vendorclass=IA32,PXEClient:Arch:00006 dhcp-vendorclass=UEFI,PXEClient:Arch:00007 dhcp-vendorclass=UEFI,PXEClient:Arch:00009 # Common PXE options dhcp-option=vendor:PXEClient,6,2b dhcp-option=option:ntp-server,0.0.0.0 dhcp-option-force=210,http:///httpboot/ #dhcp-option-force=211,600 dhcp-no-override dhcp-option-force=net:BIOS,209,/syslinux/pxelinux.cfg dhcp-option-force=net:IA32,209,/EFI/BOOT/pxelia32.cfg dhcp-option-force=net:UEFI,209,/EFI/BOOT/pxelx64.cfg dhcp-boot=net:BIOS,syslinux/lpxelinux.0 dhcp-boot=net:UEFI,EFI/BOOT/BOOTX64.EFI dhcp-boot=net:IA32,EFI/BOOT/BOOTIA32.EFI pxe-prompt=net:BIOS,"Press F8 for BIOS boot menu", 5 pxe-prompt=net:UEFI,"Press F8 for UEFI boot menu", 5 pxe-prompt=net:IA32,"Press F8 for IA32 boot menu", 5 # PXE options pxe-service=BC_EFI, "Boot from network", EFI/BOOT/BOOTX64.EFI pxe-service=BC_EFI, "Boot from local disk", 0 pxe-service=IA64_EFI, "Boot from network", EFI/BOOT/BOOTX64.EFI pxe-service=IA64_EFI, "Boot from local disk", 0 pxe-service=IA32_EFI, "Boot from network", EFI/BOOT/BOOTIA32.EFI pxe-service=IA32_EFI, "Boot from local disk", 0 pxe-service=x86PC, "Boot from network", syslinux/lpxelinux pxe-service=x86PC, "Boot from local disk", 0 pxe-service=X86-64_EFI, "Boot from network", EFI/BOOT/BOOTX64.EFI pxe-service=X86-64_EFI, "Boot from local disk", 0 # end of config