码迷,mamicode.com
首页 > 其他好文 > 详细

CentOS 7 使用iptables防火墙

时间:2017-07-22 23:43:40      阅读:207      评论:0      收藏:0      [点我收藏+]

标签:sso   lib   system   ice   class   service   res   table   process   

# 停止firewalld服务

systemctl stop firewalld

systemctl mask firewalld

# 安装iptables-services

yum install iptables-services

Enable the service at boot-time:

# 启动iptables服务

systemctl enable iptables

# 管理iptables

systemctl [stop|start|restart] iptables

# 保存规则

service iptables save 或者 /usr/libexec/iptables/iptables.init save

 

centos7不再使用iptables,而是使用firewalld
若不想使用firewalld,继续使用iptables,可以停掉firewalld,并且安装iptables-services包
systemctl stop firewalld
systemctl disable firewalld
yum install -y iptables-services
systemctl enable iptables
systemctl start iptables

CentOS 7 使用iptables防火墙

标签:sso   lib   system   ice   class   service   res   table   process   

原文地址:http://www.cnblogs.com/weifeng1463/p/7223114.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!