CentOS7关闭默认firewall启用iptables防火墙
CentOS7关闭firewall启用iptables防火墙
CentOS 7系统默认的防火墙是firewall,但是我们很多人还是习惯使用iptables,本文介绍如何关闭默认的firewall防火墙,并启用iptables作为防火墙
1、关闭默认的firewall防火墙
systemctl stop firewalld.service
2、禁用firewall防火墙
systemctl disable firewalld.service
[root@app1 home]
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.
3、安装并启动iptables防火墙
yum install iptables
yum install iptables-services -y
systemctl start iptables
4、设置iptables开启启动
systemctl enable iptables.service
至此iptables已经可以正常使用了
5、配置文件
vi /etc/sysconfig/iptables
systemctl restart iptables
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)