[SOLVED] How to give PVE server internet access while doing IP address passthrough

JustaGuy

Renowned Member
Jan 1, 2010
324
2
83
Hi,

I have a firewall/gateway running in a KVM, & it needs my public static IP addresses, so I have /etc/network/interfaces set to 0.0.0.0 so that the firewall can get the IP address instead of PVE.

But now PVE doesn't have access to the internet somehow, even with a bridge set to use the firewall as a gateway. Apparently PVE isn't able to use the gateway I set there for some reason because even though resolv.conf has good nameservers set, I can't ping google.com.

Here's my /etc/network/interfaces:

Code:
# network interface settings
auto lo
iface lo inet loopback


auto eth0


auto eth1


auto eth2


auto vmbr0
iface vmbr0 inet static
    address 10.20.30.40
    netmask 255.255.255.0
    bridge_ports eth0
    bridge_stp off
    bridge_fd 0
    
auto vmbr1
iface vmbr1 inet static
    address  0.0.0.0
    netmask  0.0.0.0
    gateway 0.0.0.0
    bridge_ports eth1
    bridge_stp off
    bridge_fd 0


auto vmbr2
iface vmbr2 inet static
    address 0.0.0.0
    netmask 0.0.0.0
    gateway 0.0.0.0
    bridge_ports eth2
    bridge_stp off
    bridge_fd 0


auto vmbr3
iface vmbr3 inet static
    address  10.11.12.1
    netmask  255.255.255.0
    bridge_ports none
    bridge_stp off
    bridge_fd 0


auto vmbr4
iface vmbr4 inet static
    address  10.15.20.1
    netmask  255.255.255.0
    bridge_ports none
    bridge_stp off
    bridge_fd 0
    
auto vmbr5
iface vmbr5 inet static
    address    10.100.200.30
    netmask 255.255.255.0
    gateway 10.20.30.2
    bridge_ports none
    bridge_stp off
    bridge_fd 0

Here's what it looks like in my VM:
qUJDdJ3.jpg


Do I have to do something in /etc/hosts maybe?

What can I do?
 
Last edited:
Re: How to give PVE server internet access while doing IP address passthrough

I figured out that I had omitted a gateway on the bridge providing the IP address the PVE host was using as defined in /etc/hosts.

So now PVE has access to the net via the Multi-WAN VM providing internet for the rest of the network.

Here's what my new, working /etc/network/interfaces looks like:

Code:
# network interface settings
auto lo
iface lo inet loopback


auto eth0


auto eth1


auto eth2


auto vmbr0
iface vmbr0 inet static
    address 10.20.30.40
    netmask 255.255.255.0
    gateway 10.20.30.2
    bridge_ports eth0
    bridge_stp off
    bridge_fd 0
    
auto vmbr1
iface vmbr1 inet static
    address  0.0.0.0
    netmask  0.0.0.0
    gateway 0.0.0.0
    bridge_ports eth1
    bridge_stp off
    bridge_fd 0


auto vmbr2
iface vmbr2 inet static
    address 0.0.0.0
    netmask 0.0.0.0
    gateway 0.0.0.0
    bridge_ports eth2
    bridge_stp off
    bridge_fd 0


auto vmbr3
iface vmbr3 inet static
    address  10.11.12.1
    netmask  255.255.255.0
    bridge_ports none
    bridge_stp off
    bridge_fd 0


auto vmbr4
iface vmbr4 inet static
    address  10.15.20.1
    netmask  255.255.255.0
    bridge_ports none
    bridge_stp off
    bridge_fd 0
 
Last edited: