I'm running VirtualBox 6.1.4 r136177 (Qt5.6.3) on a macOS Catalina 10.15.3.
On the host I have configured the vboxnet0 interface as shown below:
Code: Select all
talek@mac ~ % ifconfig vboxnet0
vboxnet0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
ether 0a:00:27:00:00:00
inet 192.168.56.1 netmask 0xffffff00 broadcast 192.168.56.255
Code: Select all
vagrant@seneca:~$ ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:5f:bb:e6
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe5f:bbe6/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:870 errors:0 dropped:0 overruns:0 frame:0
TX packets:643 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:97101 (97.1 KB) TX bytes:94250 (94.2 KB)
eth1 Link encap:Ethernet HWaddr 08:00:27:41:b5:e3
inet addr:192.168.56.4 Bcast:192.168.56.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe41:b5e3/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:31 errors:0 dropped:0 overruns:0 frame:0
TX packets:964 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1860 (1.8 KB) TX bytes:93210 (93.2 KB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:12 errors:0 dropped:0 overruns:0 frame:0
TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:888 (888.0 B) TX bytes:888 (888.0 B)
Code: Select all
talek@mac ~ % ping 192.168.56.4
PING 192.168.56.4 (192.168.56.4): 56 data bytes
64 bytes from 192.168.56.4: icmp_seq=0 ttl=64 time=0.395 ms
64 bytes from 192.168.56.4: icmp_seq=1 ttl=64 time=0.279 ms
64 bytes from 192.168.56.4: icmp_seq=2 ttl=64 time=0.408 ms
^C
--- 192.168.56.4 ping statistics ---
3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.279/0.361/0.408/0.058 ms
talek@mac ~ % ping 192.168.56.1
PING 192.168.56.1 (192.168.56.1): 56 data bytes
64 bytes from 192.168.56.1: icmp_seq=0 ttl=64 time=0.063 ms
64 bytes from 192.168.56.1: icmp_seq=1 ttl=64 time=0.067 ms
64 bytes from 192.168.56.1: icmp_seq=2 ttl=64 time=0.065 ms
^C
--- 192.168.56.1 ping statistics ---
3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.063/0.065/0.067/0.002 ms
Code: Select all
vagrant@seneca:~$ ping 192.168.56.1
PING 192.168.56.1 (192.168.56.1) 56(84) bytes of data.
... no output, waiting ...
Code: Select all
vagrant@seneca:~$ ping 192.168.56.3
PING 192.168.56.3 (192.168.56.3) 56(84) bytes of data.
64 bytes from 192.168.56.3: icmp_seq=1 ttl=64 time=0.587 ms
64 bytes from 192.168.56.3: icmp_seq=2 ttl=64 time=0.414 ms
64 bytes from 192.168.56.3: icmp_seq=3 ttl=64 time=0.520 ms
Code: Select all
vagrant@seneca:~$ arp -a
? (192.168.56.1) at 0a:00:27:00:00:00 [ether] on eth1
? (10.0.2.2) at 52:54:00:12:35:02 [ether] on eth0
? (10.0.2.3) at 52:54:00:12:35:03 [ether] on eth0
? (192.168.56.3) at 08:00:27:62:7e:11 [ether] on eth1
Code: Select all
vagrant@seneca:~$ sudo ufw status
Status: inactive
On host, the firewall is also off.
I have also disabled the packet filtering on the host, but I still can't ping the host from the guest:
Code: Select all
talek@mac seneca % sudo pfctl -d
No ALTQ support in kernel
ALTQ related functions disabled
pfctl: pf not enabled
Code: Select all
talek@mac seneca % sudo sysctl net.inet.ip.forwarding=1
net.inet.ip.forwarding: 1 -> 1
Thank you!