Previously, when using the winSCP tool to remotely connect to Linux, it was unable to connect. After configuring the network connection to bridge mode, although the client can connect without pressure, a new problem has arisen, and Linux cannot access the external network.
First, we open the network adapter configuration in VMware, select the bridge mode, and apply.
At this time, secureCRT, Xshell, and other command-line tools can connect to Linux, and WinScp and Xftp are no problem. If it is executed in the command line ping www.baidu.com
but cannot be resolved, the external network is still disconnected.
Then, open the /etc/sysconfig/network-scripts
mount
right button through the winSCP tool -edit ifcfg-ens32 BOOTPROTO
=static, set ip to static ip, ONBOOT=yes, and then set the ip address, mask, gateway, DNS and other information. The network segment of the ip address needs to be connected to the host Keep the same network segment, just keep the mask and gateway the same.
Finally, don't forget to click the save button in the upper left corner.
Use nmcli c reload +网卡名
the restart card, this is centos8 the command mode, the way may not be the same as before, Baidu click on OK, and after executing the above command, secureCRT may be disconnected. The previous ip address was dynamic. After changing the configuration file and restarting the network, the ip address has changed and the connection host needs to be reset.
Finally, use the ip addr
command to check whether the static ip we set is effective; use it to ping www.baidu.com
see if you can access the external network.