Linux virtual machine ping does not host and external network (including some problems encountered by the installation system)

Source: Internet
Author: User
Tags ping network

Own Ubuntu system installed a VirtualBox virtual machine, which is equipped with a ubuntu-server system;

1. Set up the character set first, because the first time to install the system when the choice is Chinese, but the inside is always unable to support Chinese, that even if, anyway, English can see the past

Vi/etc/default/locale

Cover it with the following two paragraphs.

Lang= "en_US. UTF-8 "
Language= "En_cn:en"

Exit save, reboot restart the computer;

2.apt-get Update sometimes makes an error, because the system comes with an incorrect path in the Sources.list file, which causes the resource report 404 error to be found

Workaround

①vi etc/apt/sources.list

② will replace the contents of the following (artful can be replaced, mainly see http://mirrors.163.com/ubuntu/dists/below what are the available prefixes to replace themselves)



Save exit
Perform apt-get update

3. The host can ping the virtual machine, and the virtual machine cannot ping the host

① set to bridging mode

② in the config URL (this way configuration, restart invalidation):

>ifconfig eth0 192.168.199.122 netmask 255.255.255.0//Configure Network

>route Add Defaut WG 192.168.199.1//Set up routing, otherwise you can ping the host, but Ping does not pass the extranet

If the above configuration ping network, but still cannot ping the extranet,

>vi/etc/resolv.conf

See where the nameserver is specified (DNS)

The route should be established for the host 192.168.199.1//depending on your situation

Save exit

Try >ping www.baidu.com again.

OK fix;

Linux virtual machine ping does not host and external network (including some problems encountered by the installation system)

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.