I’m running Proxmox VE 8.3 on a dedicated server with a single physical network interface (NIC, eth0) connected to the provider’s switch.
I want to configure three Ubuntu24 VMs to use additional public IP addresses assigned to my server so I can reach each VM (e.g., via SSH) using its dedicated IP, with all traffic routed through this single NIC.
However, I’m struggling to set this up correctly, and I need guidance to ensure the VMs can access the internet and be accessed externally.
Here’s my setup and what I’m trying to achieve:
Proxmox Host: The host uses a primary public IP (203.0.113.10/24) for management via vmbr0, with a gateway of 203.0.113.1.
I have three additional public IPs (198.51.100.2, 198.51.100.3, 198.51.100.4) from a /24 subnet (198.51.100.0/24), with a gateway of 198.51.100.1.
The server has only one physical NIC (eth0), and my provider (Contabo) confirmed that additional IPs can be added without requiring a separate interface, as described in their documentation: Configuring Additional IP Addresses.
Goal: Configure three Ubuntu 24 VMs, each with one of the public IPs (198.51.100.2, 198.51.100.3, 198.51.100.4), so I can SSH into each VM using its dedicated IP.
Ensure all traffic (both incoming to the VMs and outgoing from the VMs) goes through the single NIC (eth0).
Ensure the VMs have internet connectivity.
Current Issue: I’ve modified /etc/network/interfaces on the Proxmox host (see below), but I’m unable to access the VMs externally or get them to connect to the internet.
I want to avoid using NAT if possible, as I’d prefer direct public IP access for the VMs, per Contabo’s guidance: Configuring Additional IP Addresses
Here’s my current /etc/network/interfaces on the Proxmox host (anonymized):
And here’s the network configuration I’m using for one of the Ubuntu 24 VMs (attached to vmbr1 in Proxmox, anonymized):
What I’ve Tried:
Attached my VM to vmbr1 in the Proxmox web interface. Ensured eth0 is up and active on the Proxmox host (ip a shows it’s running). Enabled IP forwarding on the host (echo 1 > /proc/sys/net/ipv4/ip_forward). Tested pinging the gateway (198.51.100.1) and external IPs from the VMs, but no connectivity.
Questions: How can I configure Proxmox and the Ubuntu 24 VMs to use the additional public IPs (198.51.100.2, 198.51.100.3, 198.51.100.4) directly through the single NIC (eth0), allowing external access (e.g., SSH) and internet connectivity?
What routing or firewall settings am I missing on the Proxmox host or VMs to make this work without NAT?
I’m trying to follow Contabo’s documentation (Configuring Additional IP Addresses), but I’m new to Proxmox networking and need detailed guidance. Any help, including example configurations or detailed articles, would be greatly appreciated. I can provide additional details if needed.
I want to configure three Ubuntu24 VMs to use additional public IP addresses assigned to my server so I can reach each VM (e.g., via SSH) using its dedicated IP, with all traffic routed through this single NIC.
However, I’m struggling to set this up correctly, and I need guidance to ensure the VMs can access the internet and be accessed externally.
Here’s my setup and what I’m trying to achieve:
Proxmox Host: The host uses a primary public IP (203.0.113.10/24) for management via vmbr0, with a gateway of 203.0.113.1.
I have three additional public IPs (198.51.100.2, 198.51.100.3, 198.51.100.4) from a /24 subnet (198.51.100.0/24), with a gateway of 198.51.100.1.
The server has only one physical NIC (eth0), and my provider (Contabo) confirmed that additional IPs can be added without requiring a separate interface, as described in their documentation: Configuring Additional IP Addresses.
Goal: Configure three Ubuntu 24 VMs, each with one of the public IPs (198.51.100.2, 198.51.100.3, 198.51.100.4), so I can SSH into each VM using its dedicated IP.
Ensure all traffic (both incoming to the VMs and outgoing from the VMs) goes through the single NIC (eth0).
Ensure the VMs have internet connectivity.
Current Issue: I’ve modified /etc/network/interfaces on the Proxmox host (see below), but I’m unable to access the VMs externally or get them to connect to the internet.
I want to avoid using NAT if possible, as I’d prefer direct public IP access for the VMs, per Contabo’s guidance: Configuring Additional IP Addresses
Here’s my current /etc/network/interfaces on the Proxmox host (anonymized):
Code:
auto lo
iface lo inet loopback
# Loopback interface (internal system networking)
auto eth0
iface eth0 inet manual
# Primary physical NIC connected to the ISP (single uplink)
# Used as an uplink for vmbr0 (Proxmox Management) and vmbr1 (VM Public IPs)
auto vmbr0
iface vmbr0 inet static
address 203.0.113.10/24
gateway 203.0.113.1
bridge-ports eth0
bridge-stp off
bridge-fd 0
# This bridge is used for Proxmox host management (Web UI, SSH)
# It allows access to the Proxmox server itself via 203.0.113.10
auto vmbr1
iface vmbr1 inet static
address 198.51.100.1/24
bridge-ports eth0 (lost access when I tried this but thought it should be connected to a port somewhere)
bridge-stp off
bridge-fd 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
# This bridge acts as the gateway for VMs assigned public IPs from the 198.51.100.0/24 range
# It uses eth0 as the physical uplink to provide direct access to the VMs
# IP forwarding is enabled to allow routing, but I want to avoid NAT for direct public IP access
source /etc/network/interfaces.d/*
And here’s the network configuration I’m using for one of the Ubuntu 24 VMs (attached to vmbr1 in Proxmox, anonymized):
Code:
network:
version: 2
ethernets:
ens3: # Adjust the interface name as needed (check with `ip a`)
addresses:
- 198.51.100.2/24 # Use one of the IPs (e.g., 198.51.100.2, 198.51.100.3, or 198.51.100.4 for each VM)
gateway4: 198.51.100.1 # Gateway for the public IPs
nameservers:
addresses:
- 8.8.8.8 # Google DNS
- 8.8.4.4
What I’ve Tried:
Attached my VM to vmbr1 in the Proxmox web interface. Ensured eth0 is up and active on the Proxmox host (ip a shows it’s running). Enabled IP forwarding on the host (echo 1 > /proc/sys/net/ipv4/ip_forward). Tested pinging the gateway (198.51.100.1) and external IPs from the VMs, but no connectivity.
Questions: How can I configure Proxmox and the Ubuntu 24 VMs to use the additional public IPs (198.51.100.2, 198.51.100.3, 198.51.100.4) directly through the single NIC (eth0), allowing external access (e.g., SSH) and internet connectivity?
What routing or firewall settings am I missing on the Proxmox host or VMs to make this work without NAT?
I’m trying to follow Contabo’s documentation (Configuring Additional IP Addresses), but I’m new to Proxmox networking and need detailed guidance. Any help, including example configurations or detailed articles, would be greatly appreciated. I can provide additional details if needed.