[SOLVED] Connecting Ubuntu 22.04 VM to WAN

mwalton4uk

New Member
Jan 26, 2022
7
0
1
22
Hi all,

I know a hundred people are asking the same thing, but I've searched them all and can't seem to find an honest and easy answer. I want to setup Proxmox on my home server (it currently runs Ubuntu 22.04 as the main OS but I want to be able to create a home assistant and windows VM without buying more machines).

Being a home server, I only have 1 public IP of course. I simply want to know how I can allow the VMs (manly ubuntu as that's the one I'm having issues with) connect to the outside world?

I have set this up before but since then network manager (/etc/network/interfaces) seem to not be used anymore and is replaced by Netplan and idk how to do it with netplan and cant find a sufficient guide online showing how to with netplan.

I'm aware after the fact I can use iptables and port forwarding for assigning incoming ports but I just cant get the ubuntu VM to be able to connect to the outside world.
 
Hi all,

I know a hundred people are asking the same thing, but I've searched them all and can't seem to find an honest and easy answer. I want to setup Proxmox on my home server (it currently runs Ubuntu 22.04 as the main OS but I want to be able to create a home assistant and windows VM without buying more machines).

Being a home server, I only have 1 public IP of course. I simply want to know how I can allow the VMs (manly ubuntu as that's the one I'm having issues with) connect to the outside world?

I have set this up before but since then network manager (/etc/network/interfaces) seem to not be used anymore and is replaced by Netplan and idk how to do it with netplan and cant find a sufficient guide online showing how to with netplan.

I'm aware after the fact I can use iptables and port forwarding for assigning incoming ports but I just cant get the ubuntu VM to be able to connect to the outside world.
Hi,
please note that Proxmox is based on Debian, not Ubuntu and /etc/network/interfaces with ifupdown2 is used for network configuration. Inside the VM you probably want a simple static IP config with the PVE host as gateway.

Having clarified this, please let me refer you to the network configuration examples in our docs [0] in order to give you a starting point with working examples. You probably want to have the NAT setup, in order for your VMs to be able to connect to the internet.

[0] https://pve.proxmox.com/pve-docs/pve-admin-guide.html#sysadmin_network_configuration
 
Hi,
please note that Proxmox is based on Debian, not Ubuntu and /etc/network/interfaces with ifupdown2 is used for network configuration. Inside the VM you probably want a simple static IP config with the PVE host as gateway.

Having clarified this, please let me refer you to the network configuration examples in our docs [0] in order to give you a starting point with working examples. You probably want to have the NAT setup, in order for your VMs to be able to connect to the internet.

[0] https://pve.proxmox.com/pve-docs/pve-admin-guide.html#sysadmin_network_configuration
Hi Chris,

I did know Proxmox was based on Debian, what I meant was I wanted to connect a Ubuntu VM to the network.

I've setup the bridge but cant seem to get Ubuntu to recognise and connect to it and the internet.

I tried making the bridge multiple different ways and made sure to assign the VM to the bridge etc but Ubuntu just doesn't connect and all the guides I find is ubuntu using network manager not Netplan it uses now.
 
I tried making the bridge multiple different ways and made sure to assign the VM to the bridge
This is something you will do on the PVE host. Please post your cat /etc/network/interfaces as well as the VM config qm config <VMID> for the corresponding VMID.

On the Ubuntu side, you can either use DHCP if you have a DHCP service somewhere on the network or you will have to setup a static IP, there are plenty of network config examples to be found online, e.g. (without testing) https://linuxopsys.com/topics/configure-static-ip-on-ubuntu
Don't forget about nameserver configuration, otherwise DNS will not work.
 

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!