Previous Page

nihilist@mainpc - 2024-11-24

Open source router VM setup (OpnSense on QEMU/KVM)

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).

Setting up the VM

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!

Dual WAN Setup



Here we currently have the router VM using the


	


	

Nihilism

Until there is Nothing left.



Creative Commons Zero: No Rights Reserved

About nihilist

Donate XMR: 8AUYjhQeG3D5aodJDtqG499N5jXXM71gYKD8LgSsFB9BUV1o7muLv3DXHoydRTK4SZaaUBq4EAUqpZHLrX2VZLH71Jrd9k8