In this article, we will show you the steps required for setting up your own netboot server and then configuring it so that you can boot into Kali from any machine with an Ethernet connection.
The first thing you need to do is download the latest version of Netboot (currently 1.0) from their website at https://www.kali.org/downloads/. Once you have downloaded and extracted the archive, navigate to the bin folder inside it and copy over all of its contents into a directory on your server that is accessible via HTTP or FTP.
Next, create a new file called netboot.cfg in this same directory with the following content:
# Set the variable netboot_url to the URL of the latest Kali Linux release on your server
set netboot_url http://yourserverip/kali-linux-latest
# Set the boot command to use TFTP to load the Kali Linux image into memory at address 0x800000
set bootcmd 'tftp 0x800000 kali-linux-latest'
# Set the load arguments for the Kali Linux image, specifying the initrd, root device, memory, and console settings
set loadargs 'initrd=initrd.gz root=/dev/ram rw mem=128M console=ttyS0,115200n8'
Replace yourserverip with the IP address of your server and save this file.
Now you can start configuring your DHCP server to point to Netboot. If you are using a router that supports DHCP relaying (most do), then all you need to do is add an entry for it in your routers configuration page. Otherwise, you will have to configure your own DHCP server on the same machine as Netboot.
To set up DHCP relaying on a router, go into its web interface and look for the DHCP or Network section. There should be an option called something like Relay Mode or Forward to. Enable this feature and enter your servers IP address as the destination.
If you are configuring your own DHCP server, then add a new entry with the following settings:
# This script is used to configure a DHCP server or relay mode to forward requests to a specific server.
# First, we define the subnet and its corresponding netmask.
subnet 192.168.0.0 netmask 255.255.255.0 {
# Next, we specify the range of IP addresses that will be assigned to clients.
range 192.168.0.100 192.168.0.200;
# Then, we set the next-server option to specify the IP address of the server that will handle DHCP requests.
next-server yourserverip; # replace with the IP address of your server
}
Replace yourserverip with the IP address of your Netboot server and save this file.
Now you can test out your new installation by booting into Kali from any machine on your network that supports PXE boot (most modern computers do). If everything is working correctly, then you should be able to see a menu with various options for installing or running Kali Linux.
In this post, we are going to add the Kali Bleeding-Edge repository and the Debian Unstable and Experimental repositories.
The kali-bleeding-edge Repository
The kali-bleeding-edge repository contains a number of tools that are very popular and change very frequently (even daily). It would be impractical and time-consuming to manually create and test updated packages so the packages in this repository are generated automatically whenever the upstream source changes. On the positive side, it means you are never more than 24 hours behind the upstream project but on the downside, these packages are not tested so you need to be aware that the packages in this repository may break from time to time.