Example Ubuntu virtual machine set fixed IP internet

Source: Internet
Author: User

Host machine win7linux ubuntu 14.04 LTS reference: Linux series: Ubuntu virtual machine Set fixed IP internet (configure IP, gateway, DNS, prevent resolv.conf from being rewritten) 1 Win7 set up virtual NIC 8
2 after setting up the virtual machine, restore the default settings first. It's on the VMnet8. Set 3 to enter Linux through Ifconfig view current NIC

In Linux, you can see the current Linux network card through Ifconfig. (the default appears to be sort from 0)

The eth0 in the virtual machine should be the Wamre8 network card of our outside host such as Win7.

Modify File/etc/network/interfacesmy configuration is as follows: Here the address needs to be the same network segment as the Wamre8 NIC in Win7. Gateway to be consistent. Dns-nameservers cannot access the Internet via the domain name if not set.
# interfaces(5) file used by ifup(8) and ifdown(8)auto loiface lo inet loopbackauto eth0iface eth0 inet staticaddress 192.168.127.58netmask 255.255.255.0gateway 192.168.127.2dns-nameservers 223.5.5.5  #192.168.64.2#auto eth0
you can then ping and telnet to each other on the host machine and Linuxif Ping can not telnet, check the firewall.
the host can access the Web services in the virtual machine directly through the browserThe host accesses the 80 port of the virtual machine as if there is a default problem and can perform two machine port mappings by doing the following. 






From for notes (Wiz)

Example Ubuntu virtual machine set fixed IP internet

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.