CentOS6关闭防火墙:
service iptables stop //临时关闭 chkconfig iptables off //禁止开机启动
注: Centos7使用同样命令,会提示
stop iptables.service Failed to stop iptables.service: Unit iptables.service not loaded.
CentOS7关闭防火墙:
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-services,使用下面的命令
yum install -y iptables-services //安装iptables-services service iptables stop //关闭防火墙 service iptables status //检查防火墙状态
原文地址:https://www.cnblogs.com/a1d4m/p/10051975.html
时间: 2024-11-08 20:42:15