CentOS7如何关闭默认防火墙启用iptables防火墙
温馨提示:这篇文章已超过765天没有更新,请注意相关的内容是否还可用!
iptables防火墙可以说是非常强大的,所以使用Linux的话iptables是必不可少的,但是有些Linux发行版默认防火墙并不是iptables的,为了更好的使用iptables最好是关闭原有的默认防火墙再启用iptables,这样可以减少一定的风险。
今天就以常用的CentOS7系统为例,默认使用的是firewall作为防火墙,这里改为iptables防火墙步骤。
1、关闭firewall
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动
firewall-cmd --state #查看默认防火墙状态(关闭后显示notrunning,开启后显示running)
2、安装iptables
先检查是否安装了iptables
# service iptables status
安装iptables
# yum install -y iptables
升级iptables
# yum update iptables
安装iptables-services
# yum install iptables-services
3、iptables的一些操作技巧可以参考以下这篇文章
https://www.ahaoyw.com/article/44.html
若文章图片、下载链接等信息出错,请联系反馈,博主将第一时间更新!如果喜欢本站,请打赏支持本站,谢谢!
文章版权声明:除非注明,否则均为阿豪运维笔记原创文章,转载或复制请以超链接形式并注明出处。