- CentOS6
临时关闭
service iptables stop
禁止开机启动
chkconfig iptables off
- CentOS7默认使用firewalld
临时关闭
systemctl stop firewalld
禁止开机启动
systemctl disable firewalld
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
- iptables-service
安装iptables
yum install -y iptables-services
关闭防火墙
service iptables stop
检查防火墙状态
service iptables status