Hey all, I want to isolate a set of virtual machines. I don't want them to be able to reach any other device outside of its LAN, but I want them to be able to access the internet.
I have planned how to do it, but I am pretty new to this, so I am seeking advice.
Some useful information:
I have planned how to do it, but I am pretty new to this, so I am seeking advice.
Some useful information:
- Network CIDR in which the PVE server is located:
192.168.0.0/24
- The IP for the router which has access to the internet :
192.168.0.1
- The interface
vmbr0
is attached to the only NIC I have, which is wired to the router (192.168.0.1
)
- Create a new bridge interface (
vmbr1
-172.16.0.0/24
) - Create a pfSense VM
- Attach both interfaces into it (
vmbr0
andvmbr1
) - Set its IP for the
vmbr1
network to be172.16.0.1
- Set it as the gateway for the
vmbr1
bridge network
- Attach both interfaces into it (
- Create a VM which I want to isolate (let's call it
VM01
)- Attach the
vmbr1
interface to it
- Attach the
- Configure pfSense to run as a NAT router for the
vmbr1
network - Drop all packets in which the source interface is
vmbr1
, the destination interface isvmbr0
, and the destination IP is in a private CIDR range (e.g.,192.168.0.0/16
)