Static external IP for VM's

Jlourenco

New Member
Apr 17, 2020
22
0
1
27
Hello,

I've installed proxmox on a host which as a main IP of xxx.yyy.zzz.122 and then I have an IP block of aaa.bbb.ccc.32/27.
I have managed to get the windows to work just fine but I'm not being able to configure the ubuntu vm's. Ubuntu has no internet connection.

My host interfaces configuration is the following:

Code:
auto lo
iface lo inet loopback

auto enp196s0
iface enp196s0 inet static
        address xxx.yyy.zzz.122/26
        gateway xxx.yyy.zzz.65
        post-up echo 1 > /proc/sys/net/ipv4/ip_forward
        post-up echo 1 > /proc/sys/net/ipv4/conf/enp196s0/proxy_arp

auto enp5s0f3u2u2c2
iface enp5s0f3u2u2c2 inet manual
        post-up echo 1 > /proc/sys/net/ipv4/ip_forward
        post-up echo 1 > /proc/sys/net/ipv4/conf/enp5s0f3u2u2c2/proxy_arp

auto vmbr0
iface vmbr0 inet static
        address aaa.bbb.ccc.32/27
        netmask 255.255.255.224
        bridge-ports none
        bridge-stp off
        bridge-fd 0


On a windows server VM (which is working nicely) I have the following configs:
Ip address: aaa.bbb.ccc.36
subnet: 255.255.255.224
gateway: aaa.bbb.ccc.32

When I start a ubuntu VM the file /etc/network/interfaces doesn't exist at all, I figured it was something related to the cloud-init tried removing it completely and reboot, still no file.
Also tried adding a cloud-init drive from the GUI and I then edited the Ip setting under cloud config to:
CIDR: aaa.bbb.ccc.39/27
gateway: aaa.bbb.ccc.32

which also didn't work at all, no file and no internet connection.


I'm guessing I'm missing something stupidly simple but I can't figure out why the ubuntu still has no access to the internet...
Also tried, Ubuntu 18, 19 and 20.


If anyone know what I'm missing, please let me know.

Thanks,
João Lourenço
 

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!