CentOS in the virtual machine is not connected to the extranet in NAT mode

Source: Internet
Author: User

These two days need to configure the FTP server, but the virtual machine in the NAT mode is not connected to the external network, the host can be connected with the virtual machine through the SSH, the virtual machine can also ping the same network segment host IP address, but Ping is not through the outside network,

At first I was configured like this:

Host vmnet8:172.16.1.1

Virtual Machine Network configuration in Gateway: 172.16.1.1

Virtual Machine centos:172.16.1.10

In this way, try to start the Windows DHCP service, configure the virtual machine CentOS DNS and so on, real blind busy, real search, Virtual machine NAT Networking principle only understand that the virtual machine itself network configuration gateway is connected to the outside network channels, The host's vmnet8 should only be on the same network segment as the virtual machine CentOS, and I set the IP of the vmnet8 of Windows to the same IP settings as the virtual machine network configuration, so that the virtual machine CentOS is connected to the outside world via the gateway when it accesses the extranet. And my gateway and Windows IP conflict, so that CentOS will go directly to Windows to access the extranet, and Windows is not through the Vmnet8 IP connection outside the network, so, the virtual machine CentOS is impossible to face the extranet.

Workaround: Leave the virtual Machine network configuration as: 172.16.1.1

Change the IP of the host VMNET8 to the non-gateway IP in the 172.16.1.0 network segment

The virtual machine CentOS IP is also a non-gateway IP in the 172.16.1.0 network segment

This way, the virtual machine CentOS can access the extranet through the gateway of the virtual machine's NAT service!!!

CentOS in the virtual machine is not connected to the extranet in NAT mode

Related Article

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.