Ubuntu server network configuration

Source: Internet
Author: User

A website is built in the lab and placed under the Ubuntu server in the VM. You need to configure the website so that it can be accessed within the LAN.

0) the VM is changed to the "bridge" mode.

1) modify the IP address

Open/etc/Network/interfaces

Sudo Vim/etc/Network/interfaces

Add the following statement:

Auto eth0

Iface eth0 Inet static

Address XXX. XXX # IP Address

Netmask XXX. XXX # Subnet Mask

Gateway XXX. XXX # Gateway

(2) Modify DNS

How to modify the DNS address of an Eni

Sudo Vim/etc/resolv. conf

Change to the following content:

Search localdomain

Nameserver 172.16.3.4 DNS to be modified

Nameserver 172.16.3.3 DNS

3) The last step is also the most important step.

Add the command to restart the network configuration in RC. Local:

Sudo/etc/init. d/networking restart

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.