Linux网卡配置

Standard

1.手动设置
#ifconfig etn0 192.168.1.2,设置网卡IP地址
或直接运行ifconfig,这时候要注意了,在网络接口中有一个lo接口,也就是网络回环(loopback).
再使用ping命令
#ping 192.168.1.2 -c 3
测试3次,看能否正常响应. [read more]

Linux iptables 开放Mysql端口

Standard

修改防火墙配置文件:
vi /etc/sysconfig/iptables
增加下面一行:
-A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 3306 -j ACCEPT
如果想开通21等端口,只需要将3306换成21等要开放的端口就可以了。
配置后,重新启动iptable
service iptables restart
这时就可以从外网访问Mysql了。