OPNSense as Virtual Machine

Started by daven2411, November 09, 2022, 02:36:50 PM

Previous topic - Next topic
Is it possible to install OPNSense as a Virtual Machine running on a Windows 10 PC? Can someone send me a link on how to do it.

If you can run Vagrant on your Windows PC you might want to try my project:
https://github.com/punktDe/vagrant-opnsense

You need to stick to Virtualbox 6.x at the moment. I need to update the network topology for Virtualbox 7. They actively removed features. *sigh*
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Thanks. I will investigate the possibility.

Quote from: daven2411 on November 09, 2022, 02:36:50 PM
Is it possible to install OPNSense as a Virtual Machine running on a Windows 10 PC? Can someone send me a link on how to do it.
It runs on Hyper-V, so yes, it should be able to run on a PC running Windows 10 Pro.

I've tried Hyper-V but I still cannot get into the GUI. Did you follow some instructions off the Internet.? Can you send me a link to follow.

I can ping 8.8.8.8 but cannot ping any other devices on my LAN which is 192.168.1.0/24. Also, my gateway is 192.168.1.254 but most of the tutorials have the gateway as 192.168.1.1.
Should I be using .1 or .254?

A factory new OPNsense has got 192.168.1.1 on its LAN interface and this is the DHCP server, gateway, and DNS server for all devices in that network.

If you already have an existing network using 192.168.1.0/24 and want to use that as the upstream (WAN) for your OPNsense, you need to change either that existing network or OPNsense's LAN. You cannot have the same network on two interfaces. OPNsense can be changed at the console, which should be easily accessible in a hypervisor environment.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)


Does the WAN interface have to be a different network as well as the LAN?

You need to isolate the WAN on the virtual machine so it cant get in touch with anything on the physical machine...

Quote from: daven2411 on November 09, 2022, 09:36:31 PM
Does the WAN interface have to be a different network as well as the LAN?
The WAN and the LAN have to be different from each other. For testing or whatever it is you want to do with your virtualised environment you can connect your WAN to your existing network and configure it to use DHCP (which is the default, anyway).

The LAN on OPNsense must be a different network. You can configure a host-only network in your hypervisor of choice, enable the DHCP server on OPNsense in that network, then tell your Windows PC to use that host-only network as its Internet uplink. Thereby connecting your Windows through the virtualised OPNsense to your existing network infrastructure and finally to the Internet.

Or create a second virtual machine running e.g. Windows, connect that to said host-only network, let that one access the Internet through the virtualised OPNsense ... it all depends on what you want to do.

Basic networking knowledge will be required.

If your idea is to run your PC in production through a virtualised OPNsense to add ... well, what exactly? ... that's probably possible but difficult.

My Vagrant project - just check the README on github - has got some hints on how to route traffic through the virtualised firewall for selected target addresses.

HTH,
Patrick
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

The WAN is 192.168.1.2 which is the same as my internal LAN. The LAN is 192.168.10.100 which is specific to the VM. Screenshots below, if you wouldn't mind taking a look. I am using Hyper-V on Windows 10. Regards, Dave.

https://i.imgur.com/odMqgXR.png

https://i.imgur.com/ikPqUMf.png

https://i.imgur.com/P3kVMQ8.png

with out vlans to seperate the traffic OR a second nic, this is going to be hard.
My Youtube Networing & Lab Videos :
----------------------------------------
https://www.youtube.com/jasonslabvideos

Even though I am installing it as a VM with virtual NIC's???

You can run OPNsense with two virtual NICs. What exactly are you trying to do with it, then?
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)