Multiple networks for containers

Bazinga

New Member
May 24, 2023
1
0
1
Hi there,

I am new to Proxmox and virtualization and I am having difficulty in understanding and setting up the network configuration that I want.

I have:
Proxmox VE 7-4-3 installed on a ProtectLi vault with 6 NICs

enp1s0 is connected to a port on my firewall (a ProtectLi FW running PFSense).
- the routing rules and NAT put this as a 192.168.80.X network and run this through an OpenVPN VPN
- the PFsense runs DHCP on this subnet (192.168.80.X, with 192.168.80.1 being the gateway)

enp2s) is connected to a second port on my firewall
- the routing rules and NAT put this as a 192.168.70.X network and run directly to the WAN port
- the PFsense runs DHCP on this subnet (192.168.70.X with 192.168.70.1 being the gateway)

What I am trying to do:
- I am running 3 containers and a VM
100 - docker
103 - file shares
104 - plex server
VM (101) - ubuntu desktop

I want the docker container to go out through the enp1s0 port and thus go through the VPN
I want the other container (104) to go out through the enp2s0 port and thus go directly to the internet (without VPN)

I have a vmbr0 that bridges enp1s0 and it seems to work

I can't find a way to leverage the 2nd ethernet port to go to a different network with a different gateway. I tried to create a new bridge (vmbr1 - that is linked to enp2s0) - that I assigned 192.168.70.10 to (without a default gateway) but it can't route to anywhere.

Does Proxmox allow for different containers to be on different ip subnets (through different ports)?

Help - confused.
 
I can't find a way to leverage the 2nd ethernet port to go to a different network with a different gateway. I tried to create a new bridge (vmbr1 - that is linked to enp2s0) - that I assigned 192.168.70.10 to (without a default gateway) but it can't route to anywhere.
That is the way to go. Without a default gateway you cannot route. That is the purpose of the gateway.

You may missunderstood the setup. Your PVE box does not need to be in that network, your VM has to and your VM has to have a VM from that subnet (maybe DHCP?) and set the correct gateway.

Does Proxmox allow for different containers to be on different ip subnets (through different ports)?
sure.

You would normally do this via VLANs, but ports is also OK but more to setup.
 

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!