Ubuntu under VirtualBox NAT network mode for host access to virtual machines

Source: Internet
Author: User
Tags ssh access

Reference source (in Windows environment): http://hi.baidu.com/george_gly/item/5183b76e5a79e49ac5d2498b

In the NAT network mode, the virtual machine can access the external network, access the host, but the host ping does not pass the virtual machine IP, nor can ssh, FTP, HTTP and other ways to access the virtual machine

If it is a simple requirement, it can be implemented through the VirtualBox port forwarding function, the host's access to the virtual machine

1. Open the network entry in the virtual machine settings--Port Forwarding

2, find the corresponding NAT mode network card, click on the following port forwarding, increase the forwarding rules, add the appropriate port (just fill the host port, subsystem port, IP does not fill)

Assuming that the virtual machine opens the SSH service, the service default service port is 22, then set the subsystem port is 22, host Port 8003 (self-fill, note the best is greater than 8000, less than 1024 requires root authority), then use Putty, SCRT, Xmanager and other tools when connected, the host fills in localhost, Port fill 122 (you define the host port), you can implement host SSH access to the virtual machine

Assuming the virtual machine opens the HTTPD service, the service default service port is 80, set the subsystem port to 80, host Port 180 (self-fill), then the host opens the browser, enter the address http://localhost:180 (you define the host port), That is to implement the Web service provided by the HTTPD in the virtual machine to access the host

Ubuntu under VirtualBox NAT network mode for host access to virtual machines

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.