I cant ping from Manjaro on vbox to my host on on same network

Hi I’m running Manjaro xfc_64x on virtualbox, the problem is i can ping my router just fine from Manjaro except i’m unable to ping the host i can ping from the host to my virtualbox Manjaro and my other Debian machine just fine, i tried ufw enable and disable nothing, created allow rule on ufw and still nothing i enabled smb sharing in Manjaro but still problem persists.

Can you pls help me ? Thank you so much.

Allow receiving and replying to ICMP/ping on the machines you try to ping. Issue is probably NOT on the machine sending the ping request.

Thanks Omano, but how? I can ping from my host computer which is windows to my vbox machines except from vbox machines i cant ping the host ?.

Thanks.

Are you sure you are pinging the right ip address. It will be the virtual address. You can ip a on the guest manjaro and see the gateway of the host. It will be different from what you see in host windows ipconfig /all

Windows usually does not answer on ping requests. You need to allow this. Use a Microsoft support channel if you need help with Windows specific questions.

This is due to network topology and the expected behaviour.

When you are using the default NAT type network, you need to take into consideration the configuration of the network created by the hypervisor.

With NAT type network the hypervisor creates a virtual router and isolating the network 172.16.16.0/24 using the first IP address as gateway.

This network will be routed through your host’s NIC directly to the host’s gateway.

With VMware Workstation the NAT network can access internet but is isolated from the host network.

Example using VMware Workstaiton and a Live Manjaro Plasma ISO

ip addressing

 $ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host noprefixroute 
       valid_lft forever preferred_lft forever
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 00:0c:29:38:f7:4f brd ff:ff:ff:ff:ff:ff
    altname enp2s1
    inet 172.16.40.128/24 brd 172.16.40.255 scope global dynamic noprefixroute ens33
       valid_lft 1759sec preferred_lft 1759sec
    inet6 fe80::9c53:c4cb:1a27:e0c6/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever

Host route

 $ ip route
default via 172.16.40.2 dev ens33 proto dhcp src 172.16.40.128 metric 100 
172.16.40.0/24 dev ens33 proto kernel scope link src 172.16.40.128 metric 100 

find the local router ip

$ traceroute forum.manjaro.org
traceroute to forum.manjaro.org (135.181.38.249), 30 hops max, 60 byte packets
 1  _gateway (172.16.40.2)  1.117 ms  1.041 ms  0.942 ms
 2  edge.net.nix.dk (172.30.30.1)  0.881 ms  0.813 ms  2.288 ms
 3  80.209.106.129.static.fibianet.dk (80.209.106.129)  2.524 ms  3.007 ms  3.353 ms
 4  89.150.69.122 (89.150.69.122)  7.385 ms  8.700 ms  8.345 ms
 5  ae2.core01-tkbg.bb.fibianet.dk (89.150.64.25)  7.281 ms  8.054 ms  8.932 ms
 6  * * *
 7  89.150.69.66 (89.150.69.66)  6.171 ms  6.001 ms  6.084 ms
 8  217.74.211.104 (217.74.211.104)  5.656 ms  5.233 ms  5.130 ms
 9  194.182.97.132 (194.182.97.132)  6.815 ms 194.182.96.137 (194.182.96.137)  4.286 ms  4.510 ms
10  212.112.170.208 (212.112.170.208)  4.553 ms  4.897 ms  6.246 ms
11  146.247.200.189 (146.247.200.189)  21.190 ms  21.445 ms  21.381 ms
12  hetzner.ficix1.ficix.fi (193.110.226.44)  35.567 ms  35.386 ms  35.037 ms
13  core31.hel1.hetzner.com (213.239.224.38)  35.235 ms  35.611 ms core32.hel1.hetzner.com (213.239.224.26)  34.664 ms
14  * * *
15  spine2.cloud1.hel1.hetzner.com (213.239.228.26)  33.627 ms spine1.cloud1.hel1.hetzner.com (213.239.228.22)  33.705 ms  33.539 ms
16  * * *
17  20195.your-cloud.host (95.216.128.137)  33.698 ms  33.769 ms  33.623 ms
18  static.249.38.181.135.clients.your-server.de (135.181.38.249)  33.458 ms  33.042 ms  33.070 ms

Host network gateway

 $ ping 172.30.30.1
PING 172.30.30.1 (172.30.30.1) 56(84) bytes of data.
64 bytes from 172.30.30.1: icmp_seq=1 ttl=128 time=1.39 ms
64 bytes from 172.30.30.1: icmp_seq=2 ttl=128 time=1.84 ms
64 bytes from 172.30.30.1: icmp_seq=3 ttl=128 time=1.78 ms
^C
--- 172.30.30.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2004ms
rtt min/avg/max/mdev = 1.389/1.671/1.844/0.201 ms

Internet access is possible

 $ ping manjaro.org
PING manjaro.org (116.203.91.91) 56(84) bytes of data.
64 bytes from mail.manjaro.org (116.203.91.91): icmp_seq=1 ttl=128 time=17.7 ms
64 bytes from mail.manjaro.org (116.203.91.91): icmp_seq=2 ttl=128 time=18.3 ms
64 bytes from mail.manjaro.org (116.203.91.91): icmp_seq=3 ttl=128 time=17.8 ms
^C
--- manjaro.org ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2004ms
rtt min/avg/max/mdev = 17.662/17.930/18.309/0.275 ms

but the underlying network is isolated from the guest network - even knowing the host IP does not give access

 $ ping 172.x.y.20
PING 172.x.y.20 (172.30.30.20) 56(84) bytes of data.
From 172.30.30.230 icmp_seq=1 Destination Host Unreachable
From 172.30.30.230 icmp_seq=2 Destination Host Unreachable
From 172.30.30.230 icmp_seq=3 Destination Host Unreachable
^C
--- 172.30.30.20 ping statistics ---
5 packets transmitted, 0 received, +3 errors, 100% packet loss, time 4062ms
pipe 3

Use shared folders in VM confiugration if you need to access host filesystem.

If you really need the VM to interact with the host network - you should use a bridged network instead.

1 Like

Thank you so much problem solved.

1 Like

How did you solve it ?

(So others can solve it, if they have the same question)

2 Likes