Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to change the Ubuntu Server virtual machine to bridge mode

Shulou Source: shulou.com Published: 2022-05-31 18:16:37 10月02日 Update

This article mainly explains "how to change the Ubuntu Server virtual machine into bridging mode". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn how to change the Ubuntu Server virtual machine into bridging mode.

A website has been set up inside the lab and placed under the Ubuntu Server in the virtual machine, which needs to be configured so that it can be accessed in the local area network.

0) the Ubuntu Server virtual machine is changed to bridging mode.

1) Ubuntu Server modifies IP

Open / etc/network/interfaces

Sudo vim / etc/network/interfaces

Add the following statement:

Auto eth0

Iface eth0 inet static

Address xxx.xxx.xxx.xxx # IP address

Netmask xxx.xxx.xxx.xxx # Subnet Mask

Gateway xxx.xxx.xxx.xxx # Gateway

(2) Ubuntu Server modifies DNS

The method for Ubuntu Server to modify the DNS address of the network card sudo vim / etc/resolv.conf is changed to the following:

Search localdomain

DNS that nameserver 172.16.3.4 wants to modify

DNS that nameserver 172.16.3.3 wants to modify

3) Ubuntu Server*** is also the most important step.

Add this command to restart the network configuration in rc.local:

Sudo / etc/init.d/networking restart

Thank you for reading, the above is the content of "how to change the Ubuntu Server virtual machine into bridge mode". After the study of this article, I believe you have a deeper understanding of how to change the Ubuntu Server virtual machine into bridge mode, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Mode content learning address configuration important command lab that is local area local area network ideas situations articles methods more knowledge knowledge points articles gateways Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Xiaomi macOS MariaDB Shulou Tech Info