OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • 22.7 Legacy Series »
  • OPNSense as Virtual Machine
« previous next »
  • Print
Pages: [1] 2

Author Topic: OPNSense as Virtual Machine  (Read 1294 times)

daven2411

  • Newbie
  • *
  • Posts: 13
  • Karma: 0
    • View Profile
OPNSense as Virtual Machine
« 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.
Logged

pmhausen

  • Hero Member
  • *****
  • Posts: 2544
  • Karma: 227
    • View Profile
Re: OPNSense as Virtual Machine
« Reply #1 on: November 09, 2022, 02:55:26 pm »
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*
Logged
Supermicro A2SDi-4C-HLN4F mainboard and SC101F chassis
16 GB ECC memory
Crucial MX300 275 GB SATA 2.5" plus
Crucial MX300 275 GB SATA M.2 (ZFS mirror)
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

daven2411

  • Newbie
  • *
  • Posts: 13
  • Karma: 0
    • View Profile
Re: OPNSense as Virtual Machine
« Reply #2 on: November 09, 2022, 02:58:18 pm »
Thanks. I will investigate the possibility.
Logged

bimmerdriver

  • Full Member
  • ***
  • Posts: 153
  • Karma: 14
    • View Profile
Re: OPNSense as Virtual Machine
« Reply #3 on: November 09, 2022, 05:34:06 pm »
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.
Logged

daven2411

  • Newbie
  • *
  • Posts: 13
  • Karma: 0
    • View Profile
Re: OPNSense as Virtual Machine
« Reply #4 on: November 09, 2022, 05:48:13 pm »
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.
Logged

daven2411

  • Newbie
  • *
  • Posts: 13
  • Karma: 0
    • View Profile
Re: OPNSense as Virtual Machine
« Reply #5 on: November 09, 2022, 06:59:37 pm »
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?
Logged

pmhausen

  • Hero Member
  • *****
  • Posts: 2544
  • Karma: 227
    • View Profile
Re: OPNSense as Virtual Machine
« Reply #6 on: November 09, 2022, 07:07:39 pm »
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.
Logged
Supermicro A2SDi-4C-HLN4F mainboard and SC101F chassis
16 GB ECC memory
Crucial MX300 275 GB SATA 2.5" plus
Crucial MX300 275 GB SATA M.2 (ZFS mirror)
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Supermule

  • Full Member
  • ***
  • Posts: 223
  • Karma: 15
    • View Profile
Re: OPNSense as Virtual Machine
« Reply #7 on: November 09, 2022, 07:36:45 pm »
Use VmWare Player...

Much better support for drivers

https://www.vmware.com/dk/products/workstation-player/workstation-player-evaluation.html
Logged

daven2411

  • Newbie
  • *
  • Posts: 13
  • Karma: 0
    • View Profile
Re: OPNSense as Virtual Machine
« Reply #8 on: November 09, 2022, 09:36:31 pm »
Does the WAN interface have to be a different network as well as the LAN?
Logged

Supermule

  • Full Member
  • ***
  • Posts: 223
  • Karma: 15
    • View Profile
Re: OPNSense as Virtual Machine
« Reply #9 on: November 09, 2022, 09:44:03 pm »
You need to isolate the WAN on the virtual machine so it cant get in touch with anything on the physical machine...
Logged

pmhausen

  • Hero Member
  • *****
  • Posts: 2544
  • Karma: 227
    • View Profile
Re: OPNSense as Virtual Machine
« Reply #10 on: November 09, 2022, 09:52:01 pm »
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
Logged
Supermicro A2SDi-4C-HLN4F mainboard and SC101F chassis
16 GB ECC memory
Crucial MX300 275 GB SATA 2.5" plus
Crucial MX300 275 GB SATA M.2 (ZFS mirror)
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

daven2411

  • Newbie
  • *
  • Posts: 13
  • Karma: 0
    • View Profile
Re: OPNSense as Virtual Machine
« Reply #11 on: November 10, 2022, 12:15:18 am »
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
Logged

jlab

  • Newbie
  • *
  • Posts: 37
  • Karma: 0
    • View Profile
    • Jason's Channel
Re: OPNSense as Virtual Machine
« Reply #12 on: November 10, 2022, 02:02:30 am »
with out vlans to seperate the traffic OR a second nic, this is going to be hard.
Logged
My Youtube Networing & Lab Videos :
----------------------------------------
https://www.youtube.com/jasonslabvideos

daven2411

  • Newbie
  • *
  • Posts: 13
  • Karma: 0
    • View Profile
Re: OPNSense as Virtual Machine
« Reply #13 on: November 10, 2022, 08:10:35 am »
Even though I am installing it as a VM with virtual NIC's???
Logged

pmhausen

  • Hero Member
  • *****
  • Posts: 2544
  • Karma: 227
    • View Profile
Re: OPNSense as Virtual Machine
« Reply #14 on: November 10, 2022, 08:30:43 am »
You can run OPNsense with two virtual NICs. What exactly are you trying to do with it, then?
Logged
Supermicro A2SDi-4C-HLN4F mainboard and SC101F chassis
16 GB ECC memory
Crucial MX300 275 GB SATA 2.5" plus
Crucial MX300 275 GB SATA M.2 (ZFS mirror)
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

  • Print
Pages: [1] 2
« previous next »
  • OPNsense Forum »
  • English Forums »
  • 22.7 Legacy Series »
  • OPNSense as Virtual Machine
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2023 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2