vmbr0 - Need bridged i think, but cannot make it work with one public ipv4

FuriousRage

Renowned Member
Oct 17, 2014
119
4
83
On my server i have eno0 that has the public ip assigned to the server.
This is the interface content for the vmbr0

Code:
auto vmbr0
iface vmbr0 inet static
        address 10.10.10.0/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.10.10.0/24' -o eno1 -j MASQUERADE
        post-down iptables -t nat -D POSTROUTING -s '10.10.10.0/24' -o eno1 -j MASQUERADE

iface vmbr0 inet6 static
        address myipv6::2/64
 
please check out: https://pve.proxmox.com/pve-docs/pve-admin-guide.html#sysadmin_network_configuration
especially section 3.3.6. Masquerading (NAT) with iptables
I have a similar setup, but the VM's does not get an ipv4.
That link seems to be similar to https://pve.proxmox.com/wiki/Network_Configuration which i have followed several times.
I have restarted the pve network service between, and then forced the vm client with dhclient -r

Or si my problem that i have to set a fixed 10.10.10.x ip in each vm?
 
Now a wierd thing.
From the guests, i can internet and go on internet.
But i cannot ping the host, and i cannot ping the guests from the host.
Thus i cannot port forward to the guests, because "No route to host" error.
 
Hmm. when i reboot the whole server
and quickly console to the guest, the internet works for a short time, then proxmox applies something and then the internet stops working on the guests.. And i cannot figure out what.
I have followed the wiki guide for the nat-thing
 
did you configure the firewall? try disabling first and if that works, check your rules
 
The communication stopped before i added 3 inbound rules to open ports for the VM's, but even if i remove all the rules, it still doesnt work.
I just ran "pve-firewall stop" in the console, still no internet available for the VM's

I can ping the VM's from the console tho.
And ping the host from the VM's
 
Any other ideas what to check to see why after like a minute of the server reboot, all internet works for VM's, but after this minute, something is applied and all internet for all the VM's stops working?
 
a bit more information would be very helpful (logs, guest network configs, etc.)

also please try to disable the firewall completely (not with pve-firewall stop, but to disable it in the gui under datacenter/nodes/vm/etc...)
 
a bit more information would be very helpful (logs, guest network configs, etc.)

also please try to disable the firewall completely (not with pve-firewall stop, but to disable it in the gui under datacenter/nodes/vm/etc...)
All VM's has "Firewall: No". and the host has the pve-firewall stop, so there cannot/should not be a firewall.

I dont know what else i can provide because i cannot find any reason for this and have no clue where to start.

Im not sure how quickly "post-up" in /etc/network/interfaces runs, but the only content i have there is
post-up echo 1 > /proc/sys/net/ipv4/ip_forward post-up iptables -t nat -A POSTROUTING -s '10.10.10.0/24' -o eno1 -j MASQUERADE post-down iptables -t nat -D POSTROUTING -s '10.10.10.0/24' -o eno1 -j MASQUERADE

which is required according to the wiki guides provided by proxmox site
 
hmm.
I THINK i have narrowed down my problem.
the vmbr0 shows as "state down" in ip addr. but ifup vmbr0 does not bring it up without any errors..