This is lab number 4 in this series. If you have not already completed the previous lab, please start at Lab 3: Create a virtual firewall.
- Download the current version of the Kali Installer Image from https://www.kali.org/get-kali/#kali-installer-images.
- Upload the ISO to your proxmox “ISO Image” storage.
- Create a proxmox VM using the following settings.
- General
- Node: pve
- VM ID: 201
- Name: lab4-kali
- Start at boot: Checked
- OS
- Use CD/DVD disc image file (iso): Yes
- Storage: Pick the storage path where “ISO Image” are stored.
- ISO Image: kali-linux-2026.1-installer-amd64.iso
- Use CD/DVD disc image file (iso): Yes
- Disks
- Storage: Choose where your VM virtual drive will be located
- Disk size (GiB): 100
- CPU
- Cores: 2
- CPU Limit: unlimited
- CPU Units: 100
- Memory
- Memory (MiB): 4096 (use 8192 if your proxmox server has at least 16 GB of RAM)
- Minimum memory (MiB): 4096 (use 8192 if your proxmox server has at least 16 GB of RAM)
- Network
- Bridge: vmbr0
- VLAN Tag: 20
- Model: VirtIO (paravirtualized)
- Firewall: Checked
- General
- Install Kali. When you install Kali, temporarily assign a static IP address to the virtual machine. The static IP address must be in the same subnet as your OPNSense firewall’s LAN. For the gateway, use the IP address assigned to your OPNSennse firwall’s LAN interface. Use 8.8.8.8 as the DNS server.
- Log-in to Kali.
- Open Terminal.
- Verify network connectivity with the commands
ping <OPNSense LAN Interface IP address>,ping <OPNSense WAN Interface IP Address>,ping 8.8.8.8, anddig @8.8.8.8 google.com. If you cannot ping 8.8.8.8 or resolve google.com, do not continue until you fix the problem. -
Update Kali software.
sudo apt get update && sudo apt get upgrade -y - Congratulations, you now have a Kali VM connected to the network through your virtual OPNSense firewall.
- Login to your OPNSense firewall.
- Enable the DHCP Server for the LAN subnet.
- Save your changes.
- Log out of your OPNSense firewall.
- Log into Kali.
- Change your network settings from using a static IP address to using DHCP.
- Confirm your VM receives the correct IP address, subnet mask, gateway, and DNS server from the DHCP Server on your OPNSense firewall.
- Verify network connectivity with the commands
ping <OPNSense LAN Interface IP address>,ping <OPNSense WAN Interface IP Address>,ping 8.8.8.8, anddig @8.8.8.8 google.com. If you cannot ping 8.8.8.8 or resolve google.com, do not continue until you fix the problem.
In this configuration, you will need your OPNSense firewall running for your Kali VM to have network connectivity.