Internet Connection works on proxmox but not in the VMs

Schrifti

New Member
Jun 1, 2023
6
0
1
Hi there and thy for your help!

I have installed proxmox with one ubuntu vm inside. If I ping something from the proxmox terminal, I can reach it. But I don't have any connection from my VM.

I configured everything the standard way. Is something wrong with my bridge?
What do you need to know?
 
Are you maybe using Wifi or are you virtualizing your PVE (so nested virtulization)?
If not check if you gave that ubuntu VM a proper DNS server, IP and gateway.

Is something wrong with my bridge?
Without any information we can only guess. You would need to show us your network configuration of the Ubuntu VM as well as the PVE host.
For the PVE host you can get them by running cat /etc/network/interfaces, cat /etc/hosts, cat /etc/resolv.conf
 
Are you maybe using Wifi or are you virtualizing your PVE (so nested virtulization)?
If not check if you gave that ubuntu VM a proper DNS server, IP and gateway.


Without any information we can only guess. You would need to show us your network configuration of the Ubuntu VM as well as the PVE host.
For the PVE host you can get them by running cat /etc/network/interfaces, cat /etc/hosts, cat /etc/resolv.conf
Somebody in my lab just told me, that MAC Adresses have to be registered by the admin team. I think that is the problem I encounter. Can that be the problem?

I'm trying to now setup a NAT system. Do you know where to start with that?

I have the following setup but it still does not work.

proxmox /etc/network/interfaces
Code:
auto lo
iface lo inet loopback

iface enp6s0f1 inet manual

iface enp6s0f0 inet manual

auto vmbr0
iface vmbr0 inet static
        address 130.92.xxx.xxx/23
        gateway 130.92.xxx.1
        bridge-ports enp6s0f1
        bridge-stp off
        bridge-fd 0

auto vmbr2
#private sub network
iface vmbr2 inet static
        address  192.168.1.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 '192.168.1.0/24' -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '192.168.1.0/24' -o vmbr0 -j MASQUERADE

and in the vm for /etc/network/interfaces
Code:
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
    address 192.168.1.2/24
    netmask 255.255.255.0
    gateway 192.168.1.1
    nameserver 8.8.8.8
    nameserver 1.1.1.1
 
Somebody in my lab just told me, that MAC Adresses have to be registered by the admin team. I think that is the problem I encounter. Can that be the problem?

I'm trying to now setup a NAT system. Do you know where to start with that?
Yes, then you got a problem similar to running Wifi where only packets from a single MAC are allowed and where NAT would be a solution if you don't want to ask each time for permission when creating a new VM.

Setting up a OPNsense/pfsense VM in front of your PVE host and your guests is also not that uncommon.

I have the following setup but it still does not work.

proxmox /etc/network/interfaces
Code:
auto lo
iface lo inet loopback

iface enp6s0f1 inet manual

iface enp6s0f0 inet manual

auto vmbr0
iface vmbr0 inet static
address 130.92.xxx.xxx/23
gateway 130.92.xxx.1
bridge-ports enp6s0f1
bridge-stp off
bridge-fd 0

auto vmbr2
#private sub network
iface vmbr2 inet static
address 192.168.1.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 '192.168.1.0/24' -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '192.168.1.0/24' -o vmbr0 -j MASQUERADE
and in the vm for /etc/network/interfaces
Code:
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.1.2/24
netmask 255.255.255.0
gateway 192.168.1.1
nameserver 8.8.8.8
nameserver 1.1.1.1
Looks fine to me. Did you also try it with the
Code:
post-up   iptables -t raw -I PREROUTING -i fwbr+ -j CT --zone 1
post-down iptables -t raw -D PREROUTING -i fwbr+ -j CT --zone 1
from the example in the wiki?
 

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!