Ubuntu Server 20.04 on Proxmox VE unable to connect to internet

ravi kundu

New Member
Jan 25, 2022
6
0
1
25
Good day to everyone,

I am running a Ubuntu server on Proxmox VE , but i am unable to ping to 8.8.8.8 from my Ubuntu server. I am able to ping to Proxmox VE.

My /etc/network/interfaces for proxmox :

auto lo
iface lo inet loopback

auto enp0s3
iface enp0s3 inet manual

auto vmbr0
iface vmbr0 inet static
address 192.168.2.214/24
gateway 192.168.2.1
bridge-ports enp0s3
bridge-stp off
bridge-fd 0

and my /etc/netplan/00-installer-config.yaml:

network:
ethernets:
ens18:
addresses:
- 192.168.2.234/24
gateway4: 192.168.2.1
nameservers:
addresses:
- 8.8.8.8
- 8.8.4.4
version: 2

Any help is appreciated!!
Regards
 
hi,

is the PVE on a bare metal machine?

can you ping the gateway 192.168.2.1 from the ubuntu VM?
 
Hi thanks for the reply,

No the PVE in on Virtualbox and i am unable to ping to 192.168.2.1

Ping Gives :
From 192.168.2.234 icmp_seq=50 Destination Host Unreachable
From 192.168.2.234 icmp_seq=51 Destination Host Unreachable
From 192.168.2.234 icmp_seq=52 Destination Host Unreachable
 
No the PVE in on Virtualbox and i am unable to ping to 192.168.2.1
you need to enable mac spoofing / promiscuous mode or however it might be called in virtualbox then ;)
with nested virtualization you usually need to do that when using bridged setups

also you should mention the virtualbox in the beginning :)

hope this helps
 
Last edited:
I have changed the promiscuous Mode to Allow VMs and restart the server but still ping to 8.8.8.8 in giving :
From 192.168.2.234 icmp_seq=1 Destination Host Unreachable
From 192.168.2.234 icmp_seq=2 Destination Host Unreachable
From 192.168.2.234 icmp_seq=3 Destination Host Unreachable
 
@oguz and other changes or methods you can suggest please
we don't do virtualbox support here :) you could try rebooting everything :D

the PVE networking should work out of the box (your configuration looks fine to me)

you can check the ip a && ip r output inside the ubuntu VM to make sure the routes are correct.

in case of doubt you can run a tcpdump on your PVE host to see if the ping packets are leaving:
Code:
tcpdump -envi enp0s3 icmp

and while that's running try pinging internal/external hosts inside the VM. if you see the ICMP packets showing up then it's not a PVE problem :)
 
@oguz can you help me with this please. Will changing my /etc/resolv.conf or /etc/hosts help?

(i)
/etc/resolv.conf :

nameserver 127.0.0.53
options edns0 trust-ad

(ii)
/etc/hosts :
127.0.0.1 localhost
127.0.1.1 ubuntu-server

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
 
Will changing my /etc/resolv.conf or /etc/hosts help?
if you can't even ping your gateway then that won't make any difference... (those are DNS related settings)

@oguz can you help me with this please.
if you need help then i've explained above what you can check :)
 
tcpdump -envi enp0s3 icmp
when i try running this command on PVE and try to ping 8.8.8.8 from ubuntu server i am getting :

21:22:17.611006 9e:b1:1d:b8:cd:6d > fc:7c:02:00:ca:78, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 64, id 14180, offset 0, flags [DF], proto ICMP (1), length 84)
192.168.2.234 > 8.8.8.8: ICMP echo request, id 6, seq 3, length 64
21:22:17.611418 98:01:a7:8c:bc:49 > fc:7c:02:00:ca:78, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 64, id 14180, offset 0, flags [DF], proto ICMP (1), length 84)
192.168.2.234 > 8.8.8.8: ICMP echo request, id 6, seq 3, length 64
21:22:18.619993 9e:b1:1d:b8:cd:6d > fc:7c:02:00:ca:78, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 64, id 14366, offset 0, flags [DF], proto ICMP (1), length 84)
192.168.2.234 > 8.8.8.8: ICMP echo request, id 6, seq 4, length 64

i am new to all this. If can help please
 
Last edited: