Assign public IPv4 to VM

sadeq

New Member
Oct 14, 2023
3
0
1
I have a Proxmox host with just one network device, and I recently purchased a public IPv4 subnet. However, the IP addresses in the public subnet are not in the same range as the IP address of my Proxmox host. I'm looking for guidance on how to assign these public IP addresses to my VMs in Proxmox.

Specifically, I'd like to know how to configure my Proxmox host and VMs to utilize the public subnet. What steps should I follow to ensure proper networking and routing? Are there any specific settings or configurations I need to consider? I would appreciate any insights and recommendations on how to achieve this setup successfully.
 
What is the provider you got the Public IPs from?

Generally, there are multiple ways to assign a public IP to the VM in Proxmox VE. One of the ways is to add a vmbr1 e.g.,


Code:
auto vmbr1
iface vmbr1 inet static
        address 192.168.1.1/24 # Change this to the Public Subnet
        bridge-ports none
        bridge-stp off
        bridge-fd 0


And in the VM assign the vmbr1 as a NIC and then configure the static IP inside the VM itself.
 
What is the provider you got the Public IPs from?

Generally, there are multiple ways to assign a public IP to the VM in Proxmox VE. One of the ways is to add a vmbr1 e.g.,


Code:
auto vmbr1
iface vmbr1 inet static
        address 192.168.1.1/24 # Change this to the Public Subnet
        bridge-ports none
        bridge-stp off
        bridge-fd 0


And in the VM assign the vmbr1 as a NIC and then configure the static IP inside the VM itself.
OK ,I do that but my VM cant access internet ,must bridge-ports set to "none" or "eno1" to connect this v Switch to network device , what is your advice ?
 
Do you have two NICs?

May you please post the output of the following commands:

Code:
cat /etc/network/interfaces
ip a
 

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!