I am not a pro with networking and am trying to understand the same better.
Below is the setup I have.
Host system is OSX running VirtualBox. 2 virtualbox VMs (VM1 and VM2), each running Ubuntu and both these systems are connected with the host OSX over VBoxnet0 interface in a Host Only network configuration. Both are able to perfectly ping each other.
Now what I want is that I should be able to monitor all network activity (say using Wireshark etc.) from VM1 (running Wireshark) while there is any network activity done on VM2.
How do I achieve this ?
Pardon my less understanding about it here, but will an IP forwarding be needed in this case ? I guess no, because both the VMs are on the same VBoxnet0 interface and are on the same 192.168.56.* network. Please correct me if my understanding here is wrong.
I already tried adding the IP of VM1 as the gateway for VM2 using :
route add default gw 192.168.56.102 eth0
but it did not really help a lot.