Hello folks,
I'm currently running Proxmox on a host for evaluation as we're looking for an alternative to ESXi/vSphere.
The host I'm running the tests on is a baremetal server in a datacenter. The machine has two network interfaces with two public IPs (the machine is "directly connected to the internet"). Let's assume that they are 5.5.5.2 and 5.5.5.3. The gateway is 5.5.5.1.
So far I managed to get Proxmox working with a couple of VMs using only one of the NICs of the host and having everything configured to provide internet access to the guets via routing/NAT as shown in the documentation.
Now I'd like to pass through the second NIC directly to one of the guests which will act as a virtual router. I thought that I can simply activate the second NIC on the host and "pass it through" via a bridge interface. However, I haven't been successful in giving that virtual router VM internet access so far and I'd like to seek some assistance.
Here's my Proxmox host network interfaces configuration file (/etc/network/interfaces):
I wanted to post a screenshot of the web interface but the forum doesn't let me as I'm a new user. However, I don't think that it's necessary anyway as the web interface shows pretty much exactly that configuration.
My guests are all FreeBSD. However, that shouldn't matter as network configuration is "always the same".
The guests that use vmbr0 have no problems connecting to the internet at all. However, the one VM that uses vmbr1 is unable to connect. It's also unable to ping the gateway (5.5.5.1).
Here's my FreeBSD network configuration (from /etc/rc.conf):
em0 is the guets network interface (like eth0 on most Linux distributions).
According to ifconfig, the network interface on the guest is up and has the correct IP assigned.
Could anyone help me out here? What am I missing?
I'm currently running Proxmox on a host for evaluation as we're looking for an alternative to ESXi/vSphere.
The host I'm running the tests on is a baremetal server in a datacenter. The machine has two network interfaces with two public IPs (the machine is "directly connected to the internet"). Let's assume that they are 5.5.5.2 and 5.5.5.3. The gateway is 5.5.5.1.
So far I managed to get Proxmox working with a couple of VMs using only one of the NICs of the host and having everything configured to provide internet access to the guets via routing/NAT as shown in the documentation.
Now I'd like to pass through the second NIC directly to one of the guests which will act as a virtual router. I thought that I can simply activate the second NIC on the host and "pass it through" via a bridge interface. However, I haven't been successful in giving that virtual router VM internet access so far and I'd like to seek some assistance.
Here's my Proxmox host network interfaces configuration file (/etc/network/interfaces):
Code:
auto lo
iface lo inet loopback
# Physical interface 0
auto enp5s0
iface enp5s0 inet static
address 5.5.5.2
netmask 255.255.255.0
gateway 5.5.5.1
# Virtual interface for NAT
auto vmbr0
iface vmbr0 inet static
address 10.10.10.1
netmask 255.255.255.0
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 enp5s0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.10.10.0/24' -o enp5s0 -j MASQUERADE
# Physical interface 1
auto enp6s0
iface enp6s0 inet static
address 5.5.5.3
netmask 255.255.255.0
# Virtual interface for bridging
auto vmbr1
iface vmbr1 inet manual
bridge_ports enp6s0
bridge_stp off
bridge_fd 0
My guests are all FreeBSD. However, that shouldn't matter as network configuration is "always the same".
The guests that use vmbr0 have no problems connecting to the internet at all. However, the one VM that uses vmbr1 is unable to connect. It's also unable to ping the gateway (5.5.5.1).
Here's my FreeBSD network configuration (from /etc/rc.conf):
Code:
ifconfig_em0="inet 5.5.5.3/24"
defaultrouter="5.5.5.1"
According to ifconfig, the network interface on the guest is up and has the correct IP assigned.
Could anyone help me out here? What am I missing?