How to make a bridge between LXC and VM ?

jonathanmf

New Member
Jan 30, 2019
8
0
1
36
Hello,

I need your help.

Here is my network :
PROXMOX is running 2 LXC : 1 NGINX as reverse proxy. and 1 APACHE as webserv.
Also, PROXMOX is running 1 VM : OpenMediaVault (nas)

PROXMOX is port forwarding network thanks to a bridge to NGINX. NGINX is then doing its reverse proxy job between LXC.

But, how can I make my VM speaking to LXC (and LXC to VM)? The UI is not asking some any IP address. I think that UI can bring me a solution, no? If not what can I do directly on the VM (debian based) to make it works?

Thanks for your help

Jo
 
Hi,

Which network device are you using in Proxmox GUI?

For me, I'm using vmbr0 - bridge interface.
If this configuration that you just need to input a static IP, DNS and Gateway in Your VM.
 
The same : vmbr0
If I select for the VM vmbr0, so I'm able to go on external network
If I select for the VM vmbr1, I'm alone.
 
they are already working with vmbr1. You mean vmbr0 no? I'll try this evening but I'm stupid to not have think about that before :s
 
they are already working with vmbr1. You mean vmbr0 no? I'll try this evening but I'm stupid to not have think about that before :s
I don't understand You Network Architecture.

You need that Your VM and LXC should be in same network device.
Or another way - in iptables or Your router You should to tune routing between two networks but it's more difficult.
 
Here more explanations, sorry.

- PROXMOX is running 2 LXC : 1 NGINX as reverse proxy. and 1 APACHE as webserv. = only DEVICE vmbr1
- PROXMOX is running 1 VM : OpenMediaVault (nas) = only DEVICE vmbr0

PROXMOX is port forwarding network thanks to a bridge to NGINX. NGINX is then doing its reverse proxy job between LXC.

If I join with my VM vmbr1 PROXMOX is not asking me for network information (only when creating a LXC)

what is the solution? Add 1 device more "vmbr0" to my LXC containers? Or set the VM network manually in the debian with the vmbr1 device?
 
So, it doesn't matter what to do.

When You add NIC device to VM - Proxmox never asked You about IP, Network, DNS, Gateway because it will configure inside VM. You will receive all info via DHCP or You configure network interface via static data.

When You add NIC device to LXC - Proxmox askas You which settings to use - Static IP or receive it via DHCP. So, it can be configured via web gui of Proxmox.
 
Last edited:
Yes I think that I'll do that directly into VM debian conf (You configure network interface via static data.)
I'll keep you in touch. Thx a lot ;)
 
Yes I think that I'll do that directly into VM debian conf (You configure network interface via static data.)
I'll keep you in touch. Thx a lot ;)
But remember - Your LXC and Your VM must be also with the same network device.
LXC vmbr1, vmbr0 and VM vmbr0
or
LXC vmbr1 and VM vmbr0, vmbr1
 
Okay thx, know I can ping from the NGINX LXC the OMV VM but I can't switch the UI interfaces.
I can access to OMV UI from 192.168.0.X:8000 (vmbr0) but not from 192.168.1.X:8000 (vmbr1). Any trick?

Thanks again for your help!
 
Okay thx, know I can ping from the NGINX LXC the OMV VM but I can't switch the UI interfaces.
I can access to OMV UI from 192.168.0.X:8000 (vmbr0) but not from 192.168.1.X:8000 (vmbr1). Any trick?

Thanks again for your help!

From which device have You tryed to access?
In which zone Your device? 0.x or 1.x?
 
OMV is host on VM. Actually 192.168.0.X:8000 (vmbr0) which is my home local LAN is working, but I wanted to access to the UI from the PROXMOX LAN 192.168.1.1/24.

I can acces with ens18 but not with ens19.
How can I make the bridge between them ? IPTABLES rules? I wan't to access to this VM with the 2 LANs.

ens18: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.13 netmask 255.255.255.0 broadcast 192.168.0.255
ether 8e:4b:5c:1d:9c:cc txqueuelen 1000 (Ethernet)
RX packets 363299 bytes 118310061 (112.8 MiB)
RX errors 0 dropped 6 overruns 0 frame 0
TX packets 333610 bytes 140021109 (133.5 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0


ens19: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST> mtu 1500
inet 192.168.1.5 netmask 255.255.255.0 broadcast 192.168.1.255
ether 46:7f:79:56:07:d9 txqueuelen 1000 (Ethernet)
RX packets 151 bytes 10049 (9.8 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 395 bytes 81614 (79.7 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
 
OMV is host on VM. Actually 192.168.0.X:8000 (vmbr0) which is my home local LAN is working, but I wanted to access to the UI from the PROXMOX LAN 192.168.1.1/24.

I can acces with ens18 but not with ens19.
How can I make the bridge between them ? IPTABLES rules? I wan't to access to this VM with the 2 LANs.
I don't understand why do You want such difficult way.

By the way - Is there success ping between Your local LAN and Proxmox LAN ? If yes You need to configure routing to network 192.168.1.0/24 with gateway 192.168.1.1
 

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!