[SOLVED] VMs can contact other VMs but cannot contact host or internet host

Binerf

New Member
Oct 16, 2023
3
0
1
Hi all,

I'm trying to configure Proxmox Virtual Environment 8.1.3 on a Kimsufi server (provided by the French OVH provider).

So, I've only 1 public IP on the host and would like to hide VMs behind the host.

I've configured the host network mainly through the Proxmox GUI but also directly with prompt and now /etc/network/interfaces contains:
Bash:
auto lo
iface lo inet loopback

iface eno1 inet manual

iface eno2 inet manual

auto vmbr0
iface vmbr0 inet static
        address 37.XXX.XXX.XXX/24
        gateway 37.XXX.XXX.254
        bridge-ports eno1
        bridge-stp off
        bridge-fd 0
       hwaddress 00:25:90:DA:34:42

iface vmbr0 inet6 static
        address 2001:XXXX:a:XXXX::1/128
        gateway 2001:XXXX:a:XXXX:ff:ff:ff:ff

auto vmbr1
iface vmbr1 inet static
        address 192.168.1.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 192.168.1.0/24 -o vmbr0 -j MASQUERADE
        post-down iptables -t nat -D POSTROUTING -s 192.168.1.0/24 -o vmbr0 -j MASQUERADE

And on VM side:
Bash:
auto lo
iface lo inet loopback

allow-hotplug ens18
iface ens18 inet static
       address 192.168.1.104/24
       gateway 192.168.1.1
       dns-nameservers 1.1.1.1

If I test a ping or ssh from one VM to another, it works.
But accessing internet from VMs or contacting host (192.168.1.1) from VMs (ping, ssh) doesn't work.

I think I miss something but I don't know what.

Thank you in advance for your help.
 
Ok, found my mistake.

I select the wrong vmbr when I configured my VMs....


Sorry for the noise.
 
Yes, sorry, I didn't detail my fix.

In the configuration of the VM (basically a backup I restored, backup coming from another Proxmox server):

1701506029176.png
I just updated bridge=vmbr0 to bridge=vmbr1
 

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!