This is my config on proxmox 8.2 about interface
and this is VM-routes
So I my first question : when I create VM from GUI for network, which I must choose, vmbr1 or vmbr0,
for example I want run debian VM
Second question: when I want set IP address of VMs manually, which gateway must set for each VMs?
I want my VMs has more than subnets.
3.2.1.38 is public IP, I want my VM can see internet and can update and install packages.
Code:
source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback
iface lo inet6 loopback
auto eno1
iface eno1 inet static
address 3.2.1.38/26
gateway 3.2.1.1
up route add -net 3.2.1.0 netmask 255.255.255.255 gw 3.2.1.1 dev en01
iface eno1 inet6 static
address 2a01:4f9:3070:2c03::2/64
gateway fe80::1
up sysctl -p
auto vmbr0
iface vmbr0 inet static
address 3.2.1.38/32
bridge-ports none
bridge-stp off
bridge-fd 0
iface vmbr0 inet6 static
address 2a01:4f9:3070:2c03::2/64/128
up ip -6 route add 2a01:4f8::/64 dev vmbr0
auto vmbr1
iface vmbr1 inet static
address 10.10.5.1
netmask 255.255.255.0
bridge-ports none
bridge-stp off
bridge-fd 0
bridge-vlan-aware yes
bridge-vids 2-4094
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A POSTROUTING -s '10.10.5.0/24' -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.10.5.0/24' -o vmbr0 -j MASQUERADE
post-up iptables -t raw -I PREROUTING -i fwbr+ -j CT --zone 1
post-down iptables -t raw -D PREROUTING -i fwbr+ -j CT --zone 1
Code:
iface vmbr0 inet static
up ip route add 10.10.6.0/29 dev vmbr0
up ip route add 10.10.4.0/29 dev vmbr0
up ip route add 10.10.3.0/29 dev vmbr0
up ip route add 10.10.2.0/29 dev vmbr0
iface vmbr0 inet6 static
up ip -6 route add 2a01:4f9:3070:2c03::2/64 dev vmbr0
for example I want run debian VM
Second question: when I want set IP address of VMs manually, which gateway must set for each VMs?
I want my VMs has more than subnets.
3.2.1.38 is public IP, I want my VM can see internet and can update and install packages.
Last edited: