Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to set up NAT to surf the Internet in Linux virtual machine

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

In this issue, the editor will bring you about the Linux virtual machine how to set up NAT Internet, the article is rich in content and professional analysis and description for you, I hope you can get something after reading this article.

How to set up NAT to surf the Internet in Linux virtual machine? Using NAT mode is to let the virtual system access the public network through the network where the host machine is located with the help of NAT (Network address Translation) function. Let's take a look at the specific method of setting up NAT to surf the Internet by Linux virtual machine.

Use NAT mode to connect to

1. Check your ip, open cmd, and type ipconfig in the small black box. Find VMware Network Adapter VMnet8 and don't close this window yet. Do the next step

two。 First take a look at all the network connections on your computer and find VMware Network Adapter VMnet8. This is the ip connection associated with the virtual machine in NAT mode. The specific way to open it is shown in the figure:

3. Right-click-Properties-internet Protocol version 4 (TCP/IPv4) this, and then double-click. If it has not been set before, it should be empty. Like this, just leave it.

4. Open the small black box in the first step, fill in the ip, and just use the gateway for dns. And then determine

5. Open the settings for the virtual machine (right-click-Settings), locate the network adapter, and select NAT mode. As shown in the picture

6. Menu bar-Edit-Virtual Network Editor. Then set it according to the network connection VMware Network Adapter VMnet8 we made before. Look at the picture in detail

7. Configure the network card eth0 of linux (there may be no eth0, you can take a look at the configuration file at the beginning of ifcfg-)

Vi / etc/sysconfig/network-scripts/ifcfg-eth0

8. Set up DNS, using the linux command

Vi / etc/resolv.conf

Add a paragraph like this. Nameserver 192.168.239.2 (dns set previously)

9. Restart the network configuration

Service network restart

10. View the network address of linux

Ifconfig

What are the versions of Linux? the versions of Linux are Deepin, UbuntuKylin, Manjaro, LinuxMint, Ubuntu and so on. Among them, Deepin is one of the best-developed Linux distributions in China; UbuntuKylin is a derivative release based on Ubuntu; Manjaro is a Linux release based on Arch; LinuxMint's default Cinnamon desktop is similar to Windows XP's easy-to-use; Ubuntu is the Linux operating system based on desktop applications.

This is how the Linux virtual machine shared by the editor is set up to access the Internet. If you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report