2.3 OPNsense platform
OPNsense will serve as the secure entry point to the C2 environment. As an open-source firewall and router, it sits at the edge of the network and manages how traffic enters, leaves, and moves between internal segments. This makes it a key control point for enforcing network segmentation, restricting communication between systems, and reducing unnecessary exposure across the environment. Where needed, OPNsense can also provide core network services such as DNS and DHCP, helping centralize basic infrastructure functions.
When combined with OpenVPN, OPNsense also enables encrypted remote access, allowing authorized users to connect to the environment securely from outside the network. In this section, you will deploy OPNsense and begin its initial configuration. Later in this module, you will finalize the configuration and set up services like OpenVPN.
2.3.1 Deploy OPNsense server
In this step, you’ll install the OPNsense VM on Proxmox VE.
-
Download the OPNsense ISO (image type:
dvd) and unpack the file (e.g. with 7-Zip). In the course version 26.1.2 is used. -
Upload the ISO in PVE:
Datacenter ➜ pve ➜ local(pve) ➜ ISO Images, clickUpload, select the OPNsense ISO and clickUpload. -
Create a new VM (click
Create VMin the top-right) with these specs:General ➜ Name:
OPNsenseGeneral ➜ VM ID:
100OS ➜ Storage:
localOS ➜ ISO image: (select the OPNsense ISO)
OS ➜ Type:
OtherSystem ➜ Graphic card:
DefaultSystem ➜ Machine:
q35System ➜ BIOS:
SeaBIOSSystem ➜ SCSI Controller:
VirtlO SCSI singleDisk ➜ Bus/Device:
SCSIDisk ➜ Storage:
local-lvmDisk ➜ Disk size (GiB):
40Disk ➜ Cache:
Write backDisk ➜ Discard:
enableif youre using SSD/NVMeCPU ➜ Sockets:
1CPU ➜ Cores:
2Memory ➜ Memory (MiB):
4096Network ➜ Bridge:
vmbr0Network ➜ Model:
VirtIO (paravirtualized).Network ➜ Firewall:
enabledConfirm ➜ Finish
-
Add the other three NICs to the OPNsense VM. Go to
Datacenter ➜ pve ➜ 100 OPNsense ➜ Hardware ➜ Add ➜ Network Device, add the below bridges and selectVirtIO (paravirtualized)as the model (if prompt, clickApply Configurationto activate the added NICs).vmbr10vmbr20vmbr30
-
Start OPNsense VM and log in with the default credentials:
root : opnsense. -
To ensure the VM boots from the installed disk (not the live ISO), choose option
8) Shelland run:opnsense-installer. -
In the installation wizard, select:
Continue with default keymap ➜ Install (ZFS) ➜ select Stripe ➜ tick disk and confirm (installation starts) ➜ Confirm and exit ➜ Reboot.OPNsense should now boot from the hard drive and not from the ISO.
2.3.2 Configure OPNsense part 1
In this step, you’ll complete the baseline OPNsense configuration.
-
Open the OPNsense VM console in PVE and log in with the default credentials:
root : opnsense -
Select option 3
Reset the root passwordand set a new, strong password for the root account. -
Select option 1
Assign interfaces ➜ N (no LAGGs) ➜ N (no VLANs) ➜ assign interfaces as below ➜ y (proceed):WAN:
vtnet0LAN:
vtnet1Optional interface 1 (OPT1):
vtnet2Optional interface 2 (OPT2):
vtnet3
-
Select option 2
Set interface IP addressand configure each of the following interfaces:LAN (vtnet1 - interface 1) (CLIENTS):
10.10.10.1OPT1 (vtnet2 - interface 2) (SENSITIVE):
10.10.20.1OPT2 (vtnet3 - interface 3) (MGMT):
10.10.99.1
For LAN, OPT1, and OPT2 follow this sequence:
Select the interface number:
1(LAN),2(OPT1), or3(OPT2)Configure IPv4 via DHCP:
N(No)Enter the IPv4 address for the selected interface (see the list above). For example, for interface 1, enter
10.10.10.1.Enter the CIDR prefix length:
24Enter the IPv4 upstream gateway for this interface: leave blank (no IPv4 gateway for LAN).
Configure IPv6 via WAN tracking:
n(No)Enable DHCPv6 server on this interface:
N(No)Enter an IPv6 address: leave blank (no IPv6).
Enable the DHCP server on this interface:
y(Yes)-
Provide the DHCP range, for example:
LAN (vtnet1) (CLIENTS):
10.10.10.10 - 10.10.10.100OPT1 (vtnet2) (SENSITIVE):
10.10.20.10 - 10.10.20.250OPT2 (vtnet3) (MGMT):
10.10.99.10 - 10.10.99.100
Revert to HTTP as the web GUI protocol:
N(No)Generate a self-signed web GUI certificate:
y(Yes — do this only once) /NRestore the web GUI access defaults:
N(No).
Note: Repeat this step for LAN, OPT1 and OPT2 interfaces. The WAN interface receives its IP address via the (corporate) edge router (either through external DHCP or a static assignment).