Having Pfsense router and VMs on same server

Denon12

New Member
Jul 27, 2022
3
0
1
Hello,
I'm planning to make my first proxmox server after some tests on an old PC.
Is it possible to make a pfsense router in a VM, then have all the traffic from other VMs go throught pfsense?
I think it should work by selecting the network card connected to my switch when setting up other VMs on proxmox. Im a beginner so I want to make sure before starting out!
Cheers
 
How many network ports are on your pc?

It's easy to do with 2 or more network interfaces, harder to do with a single network interface and usually involves VLANs
 
If only the VM traffic needs to go through pfsense

create virtual network bridge not attached to any physical port on the host - e.g vmbr2
create a pfsense vm with 2 nic, one attached to a real nic with a route to the internet, the other attached to vmbr2
assign an ip to the 2nd nic as the gateway address for VM traffic
create a vm with a nic attached to vmbr2, and assign an IP in the same subnet, using the pfsense lan ip as the gateway
create filter rules in pfsense to allow traffic from LAN to WAN
 
What if I want to route the traffic from physical devices throught pfsense as well? It I understand correctly, your solution will only route traffic from VMs
 
What if I want to route the traffic from physical devices throught pfsense as well? It I understand correctly, your solution will only route traffic from VMs
Then you either need single NIC + managed switch that supports tagged VLAN (IEEE 802.1q support) or you need atleast two NICs (one for WAN and one for LAN).
 

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!