Linux Learning Note 1-CENTOS7 cannot be networked, shutting down firewalls

Source: Internet
Author: User

After installing CentOS7 with the virtual machine, it is not possible to surf the Internet, the following settings are required:

1. Set the virtual machine's network to bridge mode

2, modify the file/etc/sysconfig/network-scripts under the ifcfg-enp0s3 file, you may not be this file, but it's okay as long as the/ifcfg-exxx on the line

cd/etc/sysconfig/network-scripts/    //     switch to this directory ls-a    // View the file name in your machine VI ifcfg-enp0s3    // Modify this file to change onboot =no toOnboot=yes

3. Restart the Network Service

Service  

4. See if you can connect

IP addr     // view address ping www.baidu.com    // can ping pass, description can be networked

5. Turn off the firewall

Systemctl Stop Firewalld.service     // Stop firewallsystemctl disable Firewalld.service     // Disable firewall boot firewall-cmd--state     // View default firewall status (show notrunning after turn off, show running when turned on) 

Linux Learning Note 1-CENTOS7 cannot be networked, shutting down firewalls

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.