Ping google.com is not working.

Xibalbaa Posted messages 4 Status Member -  
mamiemando Posted messages 33228 Registration date   Status Moderator Last intervention   -

Hello,

I'm starting a training in networks and on Linux out of necessity :)

I want to do a simple ping to google.com for example, the same for google.fr, facebook.com.

Nothing happens (Kali 23 and Debian 11) on VirtualBox. I have a bridged connection.

However, if I ping 142.250.178.142, that works...

I've been scouring forums and videos for hours without success. I think it's a configuration issue and/or a DNS resolution problem.

I found some stuff but I want to be sure I've identified the problem before doing anything.

I'm out of ideas to solve the problem.

Best regards,

Xib


7 answers

avion-f16 Posted messages 19182 Registration date   Status Contributor Last intervention   4 511
 

Hello,

Can you attach the result of the command below?
This will tell us more about your current DNS configuration.

nslookup google.com
0
Xibalbaa Posted messages 4 Status Member
 

Hello,

Actually, I updated all my drivers because there were some weird things, so it's working now.

I ping google.com and I get a response.

I ping my wifi card and I get a response.

Using NAT and bridge access to ping google.com.

However, if I ping my network card in bridge access, nothing goes through.

0
Xibalbaa Posted messages 4 Status Member
 

@ avion-f16

If I do an nslookup it gives me this:

On the second line I don't understand what #53 is:

Is it the default port for TCP UDP?

I don't understand what "Non-authoritative answer" means

Then I have the address of google.com in IPv4 and IPv6?

Best Regards,

Xib

0
avion-f16 Posted messages 19182 Registration date   Status Contributor Last intervention   4 511
 

Hello,

So the DNS resolution is working. Can you attach the complete output of "ping -c3 google.com"?

I don't understand what "Non-authoritative answer" means.

It indicates that it's a response from a DNS relay/resolver, in this case 192.168.1.254 (your VirtualBox host acting as a router between the VM network and the rest), and not the authoritative DNS.

0
mamiemando Posted messages 33228 Registration date   Status Moderator Last intervention   7 940
 

Hello,

If you are connecting via Wi-Fi in bridge mode, I think the problem comes from there. Try configuring a NAT access in VirtualBox. If you absolutely want to use bridge mode, try connecting via Ethernet to your box and I think that should work.

If the goal is to transfer files between your host system and your VM and that is the reason you opted for bridge mode, know that this remains possible in NAT. If you install an SSH server on your host system, you can retrieve files from your guest systems using SCP or a file explorer like nautilus or dolphin (SFTP).

If the solutions I propose don't work, could you report the result of:

ip route

As a reminder, in order to copy and paste from VirtualBox, you need to install the guest additions on your guest system.

Good luck

0
Xibalbaa Posted messages 4 Status Member
 

Hello

@avion-f16 StatusContributor

If I do a ping -c3, it returns this (NAT access):

@mamiemando StatusModerator

No, it was more like "oh, let's see if I try to ping my network card."

-> On NAT access: it works, no problem

-> On bridged access:

It's the Destination Host Unreachable that I don't get.

It must be in the configuration level

Best regards,

Xib

0
itdevops
 

Hello, can you post the results of this.

ip -br -c a && ip r | grep default

A little ifconfig is also welcome

to see your DNS

cat /etc/resolv.conf

to see your TCP and UDP ports

ss -lntu

or

ss -ltu

0
mamiemando Posted messages 33228 Registration date   Status Moderator Last intervention   7 940
 

Hello,

Try accessing through the bridge by connecting via Ethernet, and in my opinion, it should work. I think it's simply that your Wi-Fi card doesn't allow for two local IPs simultaneously.

Good luck

0