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

centos 7如何使用firewalld 添加策略

时间:2017-07-19 17:56:36      阅读:213      评论:0      收藏:0      [点我收藏+]

标签:centos firewalld

1、运行、停止、禁用firewalld

启动:# systemctl start  firewalld

查看状态:# systemctl status firewalld 或者 firewall-cmd --state

停止:# systemctl disable firewalld

禁用:# systemctl stop firewalld

2、vim /etc/firewalld/zones/public.xml

<?xml version="1.0" encoding="utf-8"?>

<zone>

  <short>Public</short>

  <description>For use in public areas. You do not trust the other computers on networks to not harm your computer. Only selected incoming connections are accepted.</description>

  <service name="dhcpv6-client"/>

  <service name="ssh"/>      ****添加服务

  <service name="https"/>

  <port protocol="tcp" port="8080" />       *****添加端口

</zone>


参考:http://www.jb51.net/article/97964.htm


centos 7如何使用firewalld 添加策略

标签:centos firewalld

原文地址:http://fengxz.blog.51cto.com/11057685/1948921

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