Article title: UbuntuServer network configuration. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
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