[SOLVED] Access VMs and Containers from a Second Network Interface

michalisk

New Member
Jan 12, 2022
6
0
1
37
Hi,

So I have my ProxMox Server with two Network Interfaces and one Bridge interface.
My Main Network interface is connected to the Main Network which has access to the Internet.
The Bridge interface is on subnet 192.168.0.0/24.

Now, I added a second interface in which I want to connect a Second Physical Machine which will be able to communicate with the VMs of the Bridge Interface.

Apparently if I add the second interface on the same subnet as my bridge interface, the Second Physical Machine connected to the second interface can ping ProxMox Server, however I can no longer ping the VMs from my ProxMox pve.

So I assigned the second interface on a different subnet 192.168.1.0/24 and made the necessary changes on the Second Physical Machine.
Now I can ping Proxmox pve from the Second Physical Machine, and also I can ping Proxmox from the VMs.
I cannot however ping the VMs from the Second Physical Machine through the Proxmox pve, which is my main target.

Here is the config:



auto lo
iface lo inet loopback

auto eno1
iface eno1 inet static # MY MAIN INTERFACE
address 10.47.1.8/24
gateway 10.47.0.1

auto enx00116b6659d7
iface enx00116b6659d7 inet static # MY SECOND INTERFACE
address 192.168.1.2/24
bridge_ports eno1
bridge_stp off
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up echo 1 > /proc/sys/net/ipv4/conf/enx00116b6659d7/proxy_arp

auto vmbr0
iface vmbr0 inet static # MY BRIDGE INTERFACE
address 192.168.0.1/24


I would very appreciate if you could help me on this.

Thanks,
Michalis
bridge-ports none
bridge-stp off
bridge-fd 0
# post-up echo 1 > /proc/sys/net/ipv4/ip_forward post-up iptables -t nat -A POSTROUTING -s '192.168.0.0/24' -o enx00116b6659d7 -j MASQUERADE post-down iptables -t nat -D POSTROUTING -s '1$

post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A POSTROUTING -s '192.168.0.0/24' -o eno1 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '192.168.0.0/24' -o eno1 -j MASQUERADE
 

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!