CentOS6.5查看防火墙的状态:
service iptable status
CentOS 7.2查看防火墙的状态:
firewall-cmd --state
关闭防火墙:
systemctl stop firewalld.service #停止firewallsystemctl disable firewalld.service #禁止firewall开机启动
CentOS 7 查看已经开放的端口:
firewall-cmd --list-ports
设置selinux为diabled
vi /etc/sysconfig/selinux
改为:SELINUX=disabled