1

I have installed the Oracle VM VirtualBox in my laptop. Then I downloaded the Full ISO image for Oracle Linux 9.1 version (via https://yum.oracle.com/oracle-linux-isos.html) and used that in order to create an Oracle Linux (64 bit) virtual machine. The installation was successful and I was able to login to my VM.

I can ssh from my laptop to my Linux VM without any issues. I can browse the internet within the Linux machine.

I opened up a terminal and executed the below command

ping google.com

Unfortunately, it doesn't send any replies.

[root@localhost ~]# ping google.com
PING google.com(bom12s05-in-x0e.1e100.net (2404:6800:4009:80f::200e)) 56 data bytes
--- google.com ping statistics ---
113 packets transmitted, 0 received, 100% packet loss, time 114760ms

I did nslookup google.com as well as cat /etc/resol.conf. Name server details are fetched properly

I am not sure whether I am missing something here since I can access internet via an internet browser within Linux VM.

Your thoughts and opinions are much appreciated.

Result of resolvectl status

[root@localhost ~]# resolvectl status
bash: resolvectl: command not found...
Install package 'systemd-resolved' to provide command 'resolvectl'? [N/y] y

 * Waiting in queue... 
 * Loading list of packages.... 

The following packages have to be installed:

 systemd-resolved-250-12.0.1.el9_1.x86_64   System daemon that provides network name resolution to local applications

Proceed with changes? [N/y] y

 * Waiting in queue... 
 * Waiting for authentication... 
 * Waiting in queue... 
 * Downloading packages... 
 * Requesting data... 
 * Testing changes... 
 * Installing packages... 

Failed to get global data: Could not activate remote peer.

Result of nslookup google.com

Server:     X.X.X.X
Address:    X.X.X.X#98

Non-authoritative answer:
Name:   google.com
Address: 142.250.199.174
Name:   google.com
Address: 2567:7845:4756:74e::352e

Result of grep nameserver /etc/resolv.conf

nameserver X.X.X.X
nameserver fe35::f2db:74ff:fe65:576f%enp0s3

Please note that the Server value and nameserver value in nslookup and grep commands are identical.

Cheers

Artem S. Tashkinov
  • 26,392
  • 4
  • 33
  • 64

1 Answers1

1

According to the user manual IPv6 by default is disabled for guests using the NAT adapter.

  • You could try to change the guest network adapter to Bridged if you have IPv6 enabled on your LAN (network connections should be restarted in the guest or you could simply reboot it).

or

  • You could enable IPv6 using VBoxManage natnetwork modify --netname natnet1 --ipv6=on (to find out all NAT network adapters run VBoxManage natnetwork list).

Anyways, ping -4 host.com should work.

Artem S. Tashkinov
  • 26,392
  • 4
  • 33
  • 64
  • Or you could just make your guest prefer IPv4 connections: https://serverfault.com/questions/93717/setting-ipv4-as-preferred-protocol-over-ipv6 https://unix.stackexchange.com/questions/428736/how-to-make-my-system-centos-7-use-primarily-ipv4-if-its-available In this case you can still use NAT. – Artem S. Tashkinov Dec 01 '22 at 18:59
  • I ran VBoxManage natnetwork list and it showed>> NAT Networks: 0 networks found (I have 2 Adapters. Adapter 1 being Bridged and Adapter 2 being NAT) Plus without any issues ping -4 google.com works but ping google.com doesn't – Shanka Somasiri Dec 01 '22 at 19:34
  • This fixed the issue. Many Thanks for your help @Artem – Shanka Somasiri Dec 01 '22 at 20:11