Configuration help of Proxmox Network /etc/network/interfaces and Guest (Ubuntu) Netplan

frankhommers

New Member
Jan 15, 2024
6
0
1
I can't figure out how to configure the host, so that I can assign IP's from the subnet to a VM. I also need help there on how to do this for Ubuntu 22 -> Netplan.
I also want a private LAN shared across all VM's.

Help would be very much appreciated.

I anonimized the IP addresses by replacing two octets with A.B, and two other octets with C.D


IP addresses:
  • IP: 65.A.B.92
  • Gateway: 65.A.B.65
  • Netmask: 255.255.255.192
  • Broadcast: 65.A.B.127

Now I also ordered an extra subnet, and that has those details:

Extra Subnet:
  • Subnet: 95.C.D.120 / 29
  • IPs: 95.C.D.120 - 95.C.D.127
  • Gateway: 65.A.B.92
  • Subnet: 255.255.255.248
  • Broadcast: 95.C.D.127
This is my non-working configuration so far:

Code:
auto lo
iface lo inet loopback

# management interface
auto enp41s0
iface enp41s0 inet static
  address  65.A.B.92
  netmask 255.255.255.255
  pointopoint  65.A.B.65
  gateway  65.A.B.65


# private lan
auto vmbr0
iface vmbr0 inet static
        address 10.200.0.1/24
        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 '10.200.0.0/24' -o vmbr1 -j MASQUERADE
        post-up   iptables -t nat -D POSTROUTING -s '10.200.0.0/24' -o vmbr1 -j MASQUERADE


# this is for all the vm's that need to be exposed to the outside world
auto vmbr1
iface vmbr1 inet static
  address 95.C.D.121
  netmask 255.255.255.248
  bridge_ports none
  bridge_stp off
  bridge_fd 0
 

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!