F5F Stay Refreshed Power Users Networks Configure pfSense to connect virtual machines directly to a physical LAN without using NAT.

Configure pfSense to connect virtual machines directly to a physical LAN without using NAT.

Configure pfSense to connect virtual machines directly to a physical LAN without using NAT.

S
SayNoToNWO
Posting Freak
879
02-15-2023, 06:06 PM
#1
I created a PFSense virtual machine to test it out, as I haven’t used it before. My goal is to use it as a router/firewall between a virtual network and my VM’s. I’ve configured two NICs in VirtualBox—one as a bridge to connect to my physical network and the other as an internal LAN for connecting the VM. So far, I’ve adjusted settings to function, but only when default NAT rules are active, which I don’t want since I need private routing. What I found online suggests enabling outbound NAT in manual mode without rules, but that breaks internet access inside the VM. I’m not very familiar with PFSense, so I’m unsure what might be wrong but am stuck until I figure it out. For clarity, the setup looks like this: internet → ISP router → VM’s → internal network.
S
SayNoToNWO
02-15-2023, 06:06 PM #1

I created a PFSense virtual machine to test it out, as I haven’t used it before. My goal is to use it as a router/firewall between a virtual network and my VM’s. I’ve configured two NICs in VirtualBox—one as a bridge to connect to my physical network and the other as an internal LAN for connecting the VM. So far, I’ve adjusted settings to function, but only when default NAT rules are active, which I don’t want since I need private routing. What I found online suggests enabling outbound NAT in manual mode without rules, but that breaks internet access inside the VM. I’m not very familiar with PFSense, so I’m unsure what might be wrong but am stuck until I figure it out. For clarity, the setup looks like this: internet → ISP router → VM’s → internal network.

H
Hyper_B0Y
Member
215
02-16-2023, 02:59 AM
#2
You're looking to integrate pfSense with Bridged Networking?
H
Hyper_B0Y
02-16-2023, 02:59 AM #2

You're looking to integrate pfSense with Bridged Networking?

S
sguiffre
Junior Member
8
02-17-2023, 02:22 PM
#3
I haven't tried this either, but I think you should turn off NAT (probably based on the tutorial) and then set up firewall rules as needed. You might need to disable DHCP and either assign a static gateway to the virtual machines or adjust the gateway on your DHCP server. EDIT: I’m not sure if pfSense supports this, but you may also need to assign an IP on the LAN interface in the same subnet as the WAN side. What I’m struggling with is figuring out how inbound traffic will be routed.
S
sguiffre
02-17-2023, 02:22 PM #3

I haven't tried this either, but I think you should turn off NAT (probably based on the tutorial) and then set up firewall rules as needed. You might need to disable DHCP and either assign a static gateway to the virtual machines or adjust the gateway on your DHCP server. EDIT: I’m not sure if pfSense supports this, but you may also need to assign an IP on the LAN interface in the same subnet as the WAN side. What I’m struggling with is figuring out how inbound traffic will be routed.