CentOS7 关闭防火墙
//临时关闭
service iptables stop
//禁止开机启动
chkconfig iptables off
- CentOS7版本后防火墙默认使用firewalld
//临时关闭
systemctl stop firewalld
//禁止开机启动
systemctl disable firewalld
yum install -y iptables-services
//关闭防火墙
service iptables stop
Redirecting to /bin/systemctl stop iptables.service
//检查防火墙状态
service iptables status
Redirecting to /bin/systemctl status iptables.service
● iptables.service - IPv4 firewall with iptables
Loaded: loaded (/usr/lib/systemd/system/iptables.service; disabled; vendor preset: disabled)
Active: active (exited) since Sun 2018-07-29 08:51:51 EDT; 22min ago
Process: 1637 ExecStart=/usr/libexec/iptables/iptables.init start (code=exited, status=0/SUCCESS)
Main PID: 1637 (code=exited, status=0/SUCCESS)
我的博文