Connecting using TCP/IP from a virtualbox to another

自闭症网瘾萝莉.ら 提交于 2019-12-25 05:01:53

问题


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.



来源:https://stackoverflow.com/questions/43516924/connecting-using-tcp-ip-from-a-virtualbox-to-another

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!