Introduction to Linux Virtual Machine Internet access

Source: Internet
Author: User
Linux Virtual Machine introduction-Linux Enterprise Application-Linux server application information, the following is a detailed description. These days, I have been worried that my linux virtual machine cannot access the Internet.
One expert gave me some advice.
So write this article
For cainiao like me

Previously, I used routing to access the Internet.
Directly change the NIC type to NAT
Then set the ip subnet mask Gateway
Easy access
This is not the focus

Now I am using 2 m broadband by myself
Therefore, only the adsl cat is connected.
Single-line computer connection
Expert guides require ics
Ics is internet Connection Sharing
More than two connections are required
Then connect to the Internet
Enable Nic for ics pointing to Virtual Machine
Put a picture here.
Virtual Machine Nic type
Specify as vm1
Enable ics on adsl dialing

In this case, the ip address of the vm1 Nic is specified as 192.168.0.1.

Configure the ip address on the VM.

Ifconfig eth0 192.168.0.2 netmask 255.255.255.0
Route add default gw 192.168.0.1

Change dns to the dns of the local network

This is very important. I have been stuck on this issue for two days.
Ping 192.168.0.1.
Ping the local DNS.

Open a page that is familiar with the browser on the GUI.

Author: Xiaoyao clothing

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.