Network Settings for Linux

Source: Internet
Author: User
Tags nameserver

1.IP settings

Using Lspci | The grep Ethernet command checks if the Ethernet card device on the computer is detected by the kernel.


Then use the "ifconfig" command to view the network interfaces that the system has identified and activated. If it is not found, you can use the "ifconfig-a" command to locate all recognized including inactive network interfaces, and then use "Ifconfig nic name up" to activate.



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


Device=eth0

Hwaddr=08:00:27:56:05:70

Type=ethernet

Uuid=17eb0eac-6783-44e7-a710-32adf3042d37

Onboot=yes

Nm_controlled=yes

Bootproto=static


ipaddr=172.168.18.3

netmask=255.255.255.0

gateway=172.168.18.1


vi/etc/resolv.conf Specify DNS server IP information such as domain name resolution

NameServer 172.168.16.12

NameServer 8.8.8.8


Service Network restart



Firewall

Vi/etc/sysconfig/iptables

When you add a new port, should be added to the default port 22 below this rule


/etc/init.d/iptables Restart #重启防火墙使配置生效


This article is from the "program ape of those Years" blog, please be sure to keep this source http://uyuyuuy.blog.51cto.com/6190986/1791953

Network Settings for Linux

Related Article

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.