I have 2 different machines running ubuntu on virtual box and i'm trying to run a server on one machine and connect with the client from another machine . However I am not able to connect due to the fact that the IP adress given from the virtual box machine is very strange that is 10.x.x.x . I am managing to run both programs one as ./server and the other ./client localhost 2017 on the same virtual box machine however not on different machines .. I am trying to run the client using ./client 10.x.x.x 2017 and the resulting error is error connecting . I should also add that both machines on virtual box are said to have the same IP address when I checked.. any help please ?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
By default VirtualBox configures NAT networking. You need to setup your addaptors in bridge mode and make sure your router can provide both VMs with IP addresses.
You can read more about it HERE.