Access Tomcat localhost:8080 of guest VirtualBox VM from Host OS

岁酱吖の 提交于 2019-12-04 02:26:05

Get the IP Address of your guest OS and access it via that.

Setup your VM to run a host-only network, then reboot or restart networking to update DHCP. The IP address on the guest will now be accessible from the host.

You can also use bridged network mode, but that won't work when the host is disconnected from the network.

The following helped me after a new VM and tomcat installation.

Get the IP address of the Guest OS and the port number on which tomcat was started. Then you can access it via:

IP:Port/

In case you are not able to access it still or if you get no response, try

sudo iptables -F

This would flush the tables and would reflect the new mapping. You would need to do this only once though.

Type the following command on VM and then try.

sudo iptables -F

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