通过文件配置:firewalld.service(5)
firewalld.service
Name
firewalld.service — firewalld service configuration files
Synopsis
/etc/firewalld/services/service.xml
/usr/lib/firewalld/services/service.xml
Description
A firewalld service configuration file provides the information of a service entry for firewalld. The most important configuration options are ports, modules and destination addresses.
This example configuration file shows the structure of a service configuration file:
<?xml version="1.0" encoding="utf-8"?>
<service>
<short>My Service</short>
<description>description</description>
<port port="137" protocol="tcp"/>
<protocol value="igmp"/>
<module name="nf_conntrack_netbios_ns"/>
<destination ipv4="224.0.0.251" ipv6="ff02::fb"/>
</service>
Options
The config can contain these tags and attributes. Some of them are mandatory, others optional.
service
The mandatory service start and end tag defines the service. This tag can only be used once in a service configuration file. There are optional attributes for services:
version="
string"To give the service a version.
short
Is an optional start and end tag and is used to give an icmptype a more readable name.
description
Is an optional start and end tag to have a description for a icmptype.
port
Is an optional empty-element tag and can be used several times to have more than one port entry. All attributes of a port entry are mandatory:
port="
string"The port
stringcan be a single port number or a port rangeportid-portidor also empty to match a protocol only.protocol="
string"The protocol value can either be
tcp,udp,sctpordccp.For compatibility with older firewalld versions, it is possible to add protocols with the port option where the port is empty. With the addition of native protocol support in the service, this it not needed anymore. These entries will automatically be converted to protocols. With the next modification of the service file, the enries will be listed as protocols.
protocol
Is an optional empty-element tag and can be used several times to have more than one protocol entry. A protocol entry has exactly one attribute:
value="
string"The protocol can be any protocol supported by the system. Please have a look at
/etc/protocolsfor supported protocols.
source-port
Is an optional empty-element tag and can be used several times to have more than one source port entry. All attributes of a source port entry are mandatory:
port="
string"The port
stringcan be a single port number or a port rangeportid-portid.protocol="
string"The protocol value can either be
tcp,udp,sctpordccp.
module
Is an optional empty-element tag and can be used several times to enable more than one netfilter kernel helper for the service. A module entry has exactly one attribute:
name="
string"Defines the name of the kernel netfilter helper as a string.
destination
Is an optional empty-element tag and can be used only once. The destination specifies the destination network as a network IP address (optional with /mask), or a plain IP address. The use of hostnames is not recommended, because these will only be resolved at service activation and transmitted to the kernel. For more information in this element, please have a look at
--destinationin iptables(8) and ip6tables(8).ipv4="
address[/mask]"The IPv4 destination address with optional mask.
ipv6="
address[/mask]"The IPv6 destination address with optional mask.
通过文件配置:firewalld.service(5)的更多相关文章
- centos7 && centos6.5部KVM使用NAT联网并为虚拟机配置firewalld && iptables防火墙端口转发
centos7 && centos6.5 部KVM使用NAT联网并为虚拟机配置firewalld && iptables防火墙端口转发 一.准备工作: 1: 检查kvm ...
- Firewalls文件配置防火墙
1.源文件 /usr/lib/firewalld/services 2.文件配置 cat /etc/firewalld/zones/public.xml <?xml version=" ...
- Tomcat下conf下server.xml的文件配置信息
Tomcat下conf下server.xml的文件配置信息,基本上不用做任何修改就可以使用,修改的地方就是host区域的一些配置,此文件设置端口为80. 注意:Tomcat配置文件中(即server. ...
- Spring、Spring MVC、MyBatis整合文件配置详解
原文 http://www.cnblogs.com/wxisme/p/4924561.html 主题 MVC模式MyBatisSpring MVC 使用SSM框架做了几个小项目了,感觉还不错是时候总 ...
- NHibernate各种数据库连接参数文件配置方法说明
//NHibernate各种数据库连接参数文件配置方法说明 //配置文件Config/Hibernate.cfg.xml内容如下所示: <?xml version="1.0" ...
- Spring简单的文件配置
Spring简单的文件配置 “计应134(实验班) 凌豪” 一.Spring文件配置 spring至关重要的一环就是装配,即配置文件的编写,接下来我按刚才实际过程中一步步简单讲解. 首先,要在web. ...
- springmvc 项目完整示例07 设置配置整合springmvc springmvc所需jar包springmvc web.xml文件配置
前面主要是后台代码,spring以及mybatis的整合 下面主要是springmvc用来处理请求转发,展现层的处理 之前所有做到的,完成了后台,业务层和持久层的开发完成了 接下来就是展现层了 有很多 ...
- 转载 Spring、Spring MVC、MyBatis整合文件配置详解
Spring.Spring MVC.MyBatis整合文件配置详解 使用SSM框架做了几个小项目了,感觉还不错是时候总结一下了.先总结一下SSM整合的文件配置.其实具体的用法最好还是看官方文档. ...
- linux(centos7)防火墙配置firewalld和iptables
linux系统中防火墙管理有2种方式,分别是iptables和firewalld(centos7.x),下面介绍centos7的配置方法 一.firewalld: 因为cenos7默认使用firewa ...
随机推荐
- windows服务那些事
前一段时间由于项目需求,写了一个windows服务.下面总结如下: windows服务其实就是一些后台程序,和其他程序的主要区别是它运行于系统后台.微软公司为了方便我们自己定制我们的服务,提供了很多借 ...
- 【bzoj5070】危险的迷宫 费用流
题目描述 JudgeOnline/upload/201710/55.doc 输入 第一行是两个整数A与B(1≤A,B≤10),中间用空格分隔,表示该迷宫是A行B列的. 第2行至第A+1行,每行有B个1 ...
- BZOJ4345 POI2016Korale(构造+堆+线段树)
注意到k与n同阶,考虑构造一种枚举子集的方式,使得尽量先枚举较小的子集.首先sort一下,用堆维护待选子集.每次取出最小子集,并加入:1.将子集中最大数ai替换为ai+1 2.直接向子集中添加ai+1 ...
- VB托盘图标不响应WM_MOUSEMOVE的原因及解决方法
文章参考地址:http://blog.csdn.net/txh0001/article/details/38265895:http://bbs.csdn.net/topics/330106030 网上 ...
- 【BZOJ 3123】 [Sdoi2013]森林 主席树启发式合并
我们直接按父子关系建主席树,然后记录倍增方便以后求LCA,同时用并查集维护根节点,而且还要记录根节点对应的size,用来对其启发式合并,然后每当我们合并的时候我们都要暴力拆小的一部分重复以上部分,总时 ...
- bzoj3196 [TYVJ1730]二逼平衡树 树套树 线段树套替罪羊树
人傻自带大常数 二分的可行性证明: 贴近他的正确答案不会被当作次优解删掉,因为,若二分在他右边发生,那么二分一定会把左边作为优解,左边同理,所以他一定是被扣掉的所以最后一个小于等于一定是正确答案 #i ...
- CRM系统主要业务流程思维导图
[CRM五策略] ❶对客户进行分类,不是根据规模,而是根据和你的关系,越细腻越好: ❷不定期更新客户资料,信息越全面越好: ❸主动对客户进行 ...
- Nginx替换过滤文本模块replace-filter-nginx-module
1.安装此模块需要先安装sregex运行库 apt-get update;apt-get install git make gcc -y #Centos改成yum git clone https:// ...
- JS alert()、confirm()、prompt()的区别
这三个都是属于弹框类型的 使用警告.提示和确认消息框来获得用户的输入.这些消息框是 window 对象的接口方法.由于 window 对象位于对象层次的顶层,因此实际应用中不必使用这些消息框的全名(例 ...
- CSS3学习之radial-gradient(径向渐变)
转自:http://www.cnblogs.com/rainman/p/5133685.html 1.语法 径向渐变不同于线性渐变,线性渐变是从“一个方向”向“另一个方向”的颜色渐变,而径向渐变是从“ ...