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