Linux Network related

Source: Internet
Author: User

1. View Network configuration:

Command: Ifconfig

2. Configure the network:

Vi/etc/sysconfig/network-scripts/ifcfg-eth0(This is a different Linux system, some of which are ifcfg-em0, note)
Device="Eth0"//network card file nameBootproto="None"//none means the defaultHWADDR="EE:D d:11:11:11:11"//mac addressNETMASK="255.255.255.224"//Subnet maskipaddr="110.110.110.11"//IP addressGATEWAY="110.110.110.33"//gateway, with IP in a network segmentnm_controlled="Yes"Onboot="Yes"//yes says openTYPE="Ethernet"//EthernetUUID="5e582615-d06c-42e5-94c0-871afc7d245f"

Once configured, restart the network to make it effective:

/etc/init.d/network restart

3. Firewall configuration:

Vi/etc/sysconfig/iptables

Once configured, restart the firewall to make it effective:

/etc/init.d/iptables restart

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.