One VM's IP can connect to the Internet, while the other IPs can't?

etho3

New Member
Oct 23, 2023
3
0
1
Hello everyone.

I'm trying to set up Proxmox 7.4-17 VM networking. I have 4 IP addresses plus the host's one assigned to the VPS I'm trying to run Proxmox on.

Currenly, only one VM with an IP, let's call it, VM_IP_4, can access the Internet. Other VMs with the other IPs can't.

I can't understand why that is. I have set up my /etc/network/interfaces like this:

source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback


auto enp3s0
iface enp3s0 inet static
address HOST_IP/19
gateway GATEWAY_IP
dns-nameservers 1.1.1.1
dns-search lo
up route add -net HOST_IP netmask 255.255.255.255 gw GATEWAY_IP dev enp3s0
post-up echo 1 > /proc/sys/net/ipv4/conf/enp3s0/proxy_arp

auto vmbr0
iface vmbr0 inet static
address HOST_IP/22
bridge-ports none
bridge-stp off
bridge-fd 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward

And my /etc/network/interfaces.d/vm-routes like this:

iface vmbr0 inet static
up ip route add VM_IP_1/22 dev vmbr0
up ip route add VM_IP_2/22 dev vmbr0
up ip route add VM_IP_3/22 dev vmbr0
up ip route add VM_IP_4/22 dev vmbr0

Subnet is /22. Can someone help me?

Thank you.
 
Has it something to do with the fact that all IPs come from the same subnet? But only one works, whatever VM I use it on. The others never work, on any VM.
 

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!