nano /etc/dnsmasq.conf
In dnsmasq.conf, enable DHCP, TFTP and PXE startup, as well as set dhcp scope to suit your environment. If necessary, you can also define your port and DNS server by indicating the dhcp-option as shown below:
interface = eth0
dhcp-range = 192.168.101.100,192.168.101.200.12h
dhcp-boot = pxelinux.0
enable-tftp
tftp-root = / tftpboot /
dhcp-option = 3.192.168.101.1
dhcp-option = 6.8.8.8.8.8.8.4.4
With on-site edits, the dnsmasq service needs to be restarted for the changes to take effect.
restart dnsmasq service
Now, we need to create a folder to store Kali Netboot Image and download the image we want from the Kali repo.
mkdir -p / tftpboot
cd / tftpboot
# for 64 bit systems:
wget http://repo.kali.org/kali/dists/kali-rolling/main/installer-amd64/current/images/netboot/netboot.tar.gz
# for 32 bit systems:
wget http://repo.kali.org/kali/dists/kali-rolling/main/installer-i386/current/images/netboot/netboot.tar.gz
tar zxpf netboot.tar.gz
rm netboot.tar.gz
Everything has been configured, now you can boot the target system and configure it to boot from the network. It will get the IP address from the PXE server and start Kali.
See more: