In this tutorial we're going to take a look at how to setup OpnSense in a VM, in order to have the ability to do a dual-wan setup, while maintaining the FOSS requirement (which pfsense cannot provide).
First let's create an isolated LAN network virt-manager:
Then, let's download the latest Opnsense iso:
nihilist@mainpc:/run/media/nihilist/VAULT/Isos$ bzip2 -d OPNsense-24.7-dvd-amd64.iso.bz2
nihilist@mainpc:/run/media/nihilist/VAULT/Isos$ file OPNsense-24.7-dvd-amd64.iso
OPNsense-24.7-dvd-amd64.iso: ISO 9660 CD-ROM filesystem data 'OPNSENSE_INSTALL' (bootable)
Next, we create the VM itself by using the iso we just downloaded:
Now before starting the VM, we make sure that it has 2 network adapters, one being the WAN, and the other being the LAN. (take note of the mac addresses of either network interface, as we'll need to identify which one is which.)
Then we begin installing the VM as follows:
And then, we make sure the opnsense router VM acts as a DHCP server for the LAN:
After that, we put a debian VM in the LAN to test if the network configuration works as intended:
Here we see that we can access the router VM from the LAN just fine, so we're good!
Here we currently have the router VM using the
Donate XMR: 8AUYjhQeG3D5aodJDtqG499N5jXXM71gYKD8LgSsFB9BUV1o7muLv3DXHoydRTK4SZaaUBq4EAUqpZHLrX2VZLH71Jrd9k8