Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
22.7 Legacy Series
»
OPNSense as Virtual Machine
« previous
next »
Print
Pages:
1
[
2
]
Author
Topic: OPNSense as Virtual Machine (Read 5948 times)
daven2411
Newbie
Posts: 13
Karma: 0
Re: OPNSense as Virtual Machine
«
Reply #15 on:
November 10, 2022, 08:46:33 am »
I live in the UK and have the 'standard' router issued to me by BT. What I am trying to do is create a VM, on a spare laptop that I have, then put the BT router into 'bridge' mode and forward all traffic to the ip address of my OPNsense VM. The OPNsense VM will then be my router and do the little bit of port forwarding that I currently have. My internal network is 192.168.1.0/24 and my gateway is 192.168.1.254.
Logged
Patrick M. Hausen
Hero Member
Posts: 6826
Karma: 573
Re: OPNSense as Virtual Machine
«
Reply #16 on:
November 10, 2022, 09:05:06 am »
You will need two interfaces then. Any if you do have a spare machine, why don't you just install OPNsense on that?
Logged
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do.
(Isaac Asimov)
daven2411
Newbie
Posts: 13
Karma: 0
Re: OPNSense as Virtual Machine
«
Reply #17 on:
November 10, 2022, 10:10:09 am »
There is only one network port on my laptop. that is why I am trying to install it on a VM.
Logged
Patrick M. Hausen
Hero Member
Posts: 6826
Karma: 573
Re: OPNSense as Virtual Machine
«
Reply #18 on:
November 10, 2022, 11:14:50 am »
And how will you connect it to your network and to the ISP bridge modem, then? You could use VLANs and a VLAN capable switch. E.g. a Unifi Edgerouter-X makes a nice 5 port switch for around 50 euro/dollar/pounds.
Did you check that you can run your laptop with the lid closed, that it won't go to sleep unexpectedly, that it can shut down the display ...
Laptops are not well suited to run services that are supposed to be available 24x7.
Logged
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do.
(Isaac Asimov)
daven2411
Newbie
Posts: 13
Karma: 0
Re: OPNSense as Virtual Machine
«
Reply #19 on:
November 10, 2022, 11:36:23 am »
Laptop can run perfectly with the lid closed. I was hoping to install OPNsense into a VM in either VirtualBox, Hyper-V or even install Proxmox VE on my laptop and install it in a VM under that. I thought I might be able to create multiple NIC's and give them appropriate IP addresses based on the fact that my current internal LAN is 192.168.1.0/24.
Logged
cookiemonster
Hero Member
Posts: 1823
Karma: 95
Re: OPNSense as Virtual Machine
«
Reply #20 on:
November 10, 2022, 11:42:53 am »
That you can but with one physical nic only on the device, once it is connected to the bridge, there's no nic left to go downstream to your local network. Unless all your devices are only VMs inside the laptop.
Logged
daven2411
Newbie
Posts: 13
Karma: 0
Re: OPNSense as Virtual Machine
«
Reply #21 on:
November 10, 2022, 07:05:16 pm »
https://www.youtube.com/watch?v=rVQFGoUG6II
Can you tell me if the instructions in this video will help me in any way?
Logged
cookiemonster
Hero Member
Posts: 1823
Karma: 95
Re: OPNSense as Virtual Machine
«
Reply #22 on:
November 10, 2022, 11:01:46 pm »
It does as a theoretical exercise. If you look at the very beginning, it shows the only physical interface is allocated to wan. The two virtual ones are for "internal". Imagine that was a very beefy server and has 20 virtual machines on it. With that tutorial you have a firewall/router vm and two virtual nics for two independent networks, two vlans to be specific. So all traffic is internal to hypervisor and its guests.
If what you want to to is setup a virtual machine for OPN or any router/firewall OS, you need two physical network interfaces minimum unless you go on a very hackish way splitting cables from an rj45 connector for a 100 mb part but only good for academic purposes.
Forgive the plug but I'll be having a spare APU4 in a couple of weeks if interested.
Logged
daven2411
Newbie
Posts: 13
Karma: 0
Re: OPNSense as Virtual Machine
«
Reply #23 on:
November 10, 2022, 11:25:49 pm »
Thanks for the advice. I have sent you a private message.
Logged
bimmerdriver
Full Member
Posts: 159
Karma: 14
Re: OPNSense as Virtual Machine
«
Reply #24 on:
November 11, 2022, 09:53:52 pm »
As others have said, if you want to use OPNsense as a router / firewall for other devices, you need a dedicated WAN interface. If you're running it on a laptop with only one ethernet port, you could get a USB ethernet interface.
To be honest, a laptop is far from an ideal computer to run a router, unless you are only using it with virtual clients.
Logged
Print
Pages:
1
[
2
]
« previous
next »
OPNsense Forum
»
Archive
»
22.7 Legacy Series
»
OPNSense as Virtual Machine