Proxmox LAN Routing

proxmoxrouting

I am attempting to set up my first Proxmox hypervisor as a test server. I have managed to install Proxmox and set up some VMs however I can't get machines on my local LAN to connect to the Proxmox VMs.

  • Host Subnet: 10.11.11.0/24
  • Proxmox Host: 10.11.11.161

I have created two bridges one to act as a bridge to the WAN and the other as a private network.

Proxmox Host

auto lo
iface lo inet loopback

iface enp0s25 inet manual

auto vmbr0
iface vmbr0 inet static
    address  10.11.11.161
    netmask  255.255.255.0
    gateway  10.11.11.1
    bridge_ports enp0s25
    bridge_stp off
    bridge_fd 0

auto vmbr1
iface vmbr1 inet static
    address  10.11.12.1
    netmask  255.255.255.0
    bridge_ports none
    bridge_stp off
    bridge_fd 0

    post-up echo 1 > /proc/sys/net/ipv4/conf/vmbr0/proxy_arp
    post-up   iptables -t nat -A POSTROUTING -s '10.11.12.0/24' -o vmbr0 -j MASQUERADE
    post-down iptables -t nat -D POSTROUTING -s '10.11.12.0/24' -o vmbr0 -j MASQUERADE

Connecting to VMs from Office LAN

The VMs are set up to use network vmbr1 from the Proxmox host, I can connect into the VMs ok.

However from my machine on the office lan 10.11.11.141 I can't see the VMs. I have tried adding the following static route to pass traffic for 10.11.12.0/24 subnet to the Proxmox host.

ip route add 10.11.12.0/24 via 10.11.11.161 dev eth0

Can anyone please advice on how I can connect the office LAN to the VLAN of Proxmox.

Thanks in advance.

Best Answer

If you need direct networking access from different IP network a router (gateway) should be used by definition. The gateway should belong to both IP networks and you should be using it by means of routing table. All-in-all it can be even a VM that's run on same server or the server itself.