zl程序教程

您现在的位置是:首页 >  系统

当前栏目

centos 7 关闭 firewall、iptables详解程序员

centos程序员 详解 关闭 iptables firewall
2023-06-13 09:19:56 时间

systemctl是CentOS7的服务管理工具中主要的工具,它融合之前service和chkconfig的功能于一体。

1、关闭firewall

systemctl status firewalld.service 

systemctl stop firewalld.service 

systemctl disable firewalld.service 

firewall-cmd --state

2、关闭iptables

yum install iptables-services 

systemctl status iptables.service 

systemctl stop iptables.service 

systemctl disable iptables.service 

cd /etc/sysconfig 

mv /etc/sysconfig/iptables /etc/sysconfig/iptables.bak 

mv /etc/sysconfig/iptables-config /etc/sysconfig/iptables-config.bak 

touch /etc/sysconfig/iptables 

touch /etc/sysconfig/iptables-config 

reboot

原创文章,作者:Maggie-Hunter,如若转载,请注明出处:https://blog.ytso.com/1769.html

服务器部署程序员系统优化网站设置运维