Opnsense on a Proxmox VE 8 with a single NIC

Jarvar

Well-Known Member
Aug 27, 2019
317
10
58
I'm sure this has been asked before but I have had trouble finding the answer.
Essentially I have an old Intel NUC where I installed Proxmox VE 8 on. I will most likely eventually get a Protectlii or build a box with multiple NICs.
However, I wanted to get the Opnsense VM up, running and tested before doing that.
I have the one NIC setup as a Linux Bridge in the hardware section as vmbr0
What I did get working was using the Opnsense VM to add additional network devices which will show vmbr0
and then net0.
I believe net0 is added by default and each subsequent network device will be added as net1 and so on.
The vlans work if I tag them in proxmox, and then add and assign them interfaces within the opnsense VM.
This works, but that means each time I want to create a VLAN, I need to first add a network device within Proxmox and to that specific VM, then go inside the opnsense VM and add and assign.
Is this the way to do it? or should there be a simpler way?
is there a way to just assign VLANS inside the Opnsense VM on the same network device?
There's probably a lot that I am missing. Please help and thank you.
 
Hi Jarvar,

It is possible to assign a vlan in Opnsense or create an interface with vlan managed in proxmox.
The problem with this however is that you can only have a vlan set-up in one of these two ways at the time.
This is a limitation of the inner workings of linux bridges.

The solution for this would be to edit the bridge in proxmox and enable "vlan aware".
This will allow you to use vlans within opnsense and also use vlans in proxmox for different vm's.

Depending on how many vlans you intend to use it might still be simpler to use the method of adding interfaces for each vlan.
This way all the vlan tags are managed in proxmox instead of two locations.
 
Hi Jarvar,

It is possible to assign a vlan in Opnsense or create an interface with vlan managed in proxmox.
The problem with this however is that you can only have a vlan set-up in one of these two ways at the time.
This is a limitation of the inner workings of linux bridges.

The solution for this would be to edit the bridge in proxmox and enable "vlan aware".
This will allow you to use vlans within opnsense and also use vlans in proxmox for different vm's.

Depending on how many vlans you intend to use it might still be simpler to use the method of adding interfaces for each vlan.
This way all the vlan tags are managed in proxmox instead of two locations.
What would be the best way to do that?
They way I've tried so far with results is through proxmox. I would create on device with a vlan (lets say vlan3 under the VM to handle the WAN, then I would add another network device with another vlan (vlan19) to handle the LAN network. The vmbr0 bridge is already set to vlan aware.
This is connected to a smart managed switch. VLAN3 would pass through the connection from the modem, the VLAN19 would be LAN and VLAN1 would be how Proxmox is connected by default.

However, if I could just do this inside the opnsense VM, then it would only require me to do that under the VM and not a two step process with Proxmox as well.
I haven't gotten it to work though.
Would you have a few steps I could follow?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!