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 customize ip access to the public network in the virtual machine

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

Based on the introduction of the custom ip access to the external network in the virtual machine, this paper focuses on its concrete steps, which are simple and easy to operate, and the content of the article is compact step by step. I hope you can get something according to this article.

Local machine

IP: 10.73.xxx.xxx

Gateway: 10.73.158.1

Demand:

You want the IP of the virtual machine to be 10.0.0.x and the gateway to be 10.0.0.100. And can ping the local gateway to access the public network

Open the Virtual Network Editor, change Settings in VMware Workstation 14

Select "NAT Settings" to set the gateway IP

Save exit.

Modify the network configuration file # vi / etc/sysconfig/network-scripts/ifcfg-ens33TYPE=EthernetBOOTPROTO=staticNAME=ens33IPADDR=10.0.0.10PREFIX=24GATEWAY=10.0.0.2DNS1=114.114.114.114DNS2=8.8.8.8DEVICE=ens33ONBOOT=yes

Restart network services

Systemctl restart network

View IP

# ip a1: lo: mtu 65536 qdisc noqueue state UNKNOWN qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6:: 1/128 scope host valid_lft forever preferred_lft forever2: ens33: mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 00:0c:29:fd:15:fe brd ff:ff : ff:ff:ff:ff inet 10.0.0.10/24 brd 10.0.0.255 scope global ens33 valid_lft forever preferred_lft forever

After reading the above, have you mastered the method of customizing ip in the virtual machine to access the public network? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

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

Servers

Wechat

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

12
Report