centos7关闭默认firewall,启用iptables

CentOS 7.0默认使用"firewall"防火墙

一:关闭firewall
1、直接关闭防火墙
systemctl stop firewalld.service

2、禁止firewall开机启动
systemctl disable firewalld.service 


二:设置并开启 iptables service

1、安装IPtables

yum -y install iptables-services

2、启动|关闭|重启iptables

systemctl start|stop|status|restart iptables.service

3、设置开机自启

systemctl enable iptables.service

4、修改防火墙配置

如开放80端口

/sbin/iptables -I INPUT -p tcp --dport 8090 -j ACCEPT



 
 
原文地址:https://www.cnblogs.com/wxxjianchi/p/9936328.html