1、IP限流下发阀门只添加action和service;2、APP阻断、APP监测添加两个域表;IPSec监测IP类域表改为NTC_UNIVERSAL_IP;

2、添加service和action关系不存在的验证;
3、添加行为识别原始日志查询接口;
This commit is contained in:
zhangdongxu
2018-07-13 12:06:34 +08:00
parent d8e736d048
commit db4bdd7722
10 changed files with 175 additions and 19 deletions

View File

@@ -7,10 +7,9 @@
#0x04 IP地址丢弃 4=0:INLINE_IP_CB
#0x19 IPSec丢弃 25=0:INLINE_IP_CB
#0x1C GRE 丢弃 28=0:INLINE_IP_CB
#0x1D IPSEC丢弃 29=0:INLINE_IP_CB
#0x05 DDOS流量丢弃 5=0:DDOS_PROTECT_TARGET_IP_CB
-->
<t:commonSource serviceIds="3,4,25,28,29,5">
<t:commonSource serviceIds="3,4,25,28,5">
<t:field fieldType="String" srcName="service" dstName="service" isRequired="true"/>
<t:field fieldType="Number" srcName="action" dstName="action" isRequired="true"/>
<t:field fieldType="Number" srcName="cfgId" dstName="cfg_id" isRequired="true" />
@@ -72,9 +71,11 @@
<t:field fieldType="Number" srcName="cfgId" dstName="cfg_id" isRequired="true" />
<t:field fieldType="Number" srcName="policyGroup" dstName="policy_group" isRequired="true"/>
<t:field fieldType="Number" srcName="addrType" dstName="addr_type" isRequired="true" regexp="[4|6]"/>
<t:field fieldType="Number" srcName="protocol" dstName="protocol" isRequired="true" defaultVal="0"/>
<t:field fieldType="IP" srcName="ip" dstName="ip" isRequired="true"/>
<t:field fieldType="Port" srcName="port" dstName="port" isRequired="true"/>
<t:field fieldType="String" srcName="userRegion" dstName="user_region" isRequired="true"/>
<t:field fieldType="Number" srcName="direction" dstName="direction" isRequired="true" regexp="[0|1|2]"/>
<t:field fieldType="String" srcName="userRegion" dstName="user_region"/>
<t:field fieldType="Number" srcName="location" dstName="location" isRequired="true" regexp="[0|1]"/>
<t:field fieldType="Number" srcName="isValid" dstName="is_valid" isRequired="true" range="0-1"/>
<t:field fieldType="Date" srcName="opTime" dstName="op_time" isRequired="true"/>

View File

@@ -63,10 +63,9 @@
#0x04 IP地址丢弃 4=0:INLINE_IP_CB
#0x19 IPSec丢弃 25=0:INLINE_IP_CB
#0x1C GRE 丢弃 28=0:INLINE_IP_CB
#0x1D IPSEC丢弃 29=0:INLINE_IP_CB
#0x05 DDOS流量丢弃 5=0:DDOS_PROTECT_TARGET_IP_CB
-->
<p:maatType service="3;4;25;28;29;5">
<p:maatType service="3;4;25;28;5">
<p:expressions>
<p:keyExpression>EFFECTIVE_RULE;:;{un_maat_table_name};,;[cfg_id]</p:keyExpression>
<p:valueExpression>[cfg_id];\t;[addr_type];\t;[src_ip];\t;[mask_src_ip];\t;[src_port];\t;[mask_src_port];\t;[dst_ip];\t;[mask_dst_ip];\t;[dst_port];\t;[mask_dst_port];\t;[protocol];\t;[direction];\t;[is_valid];\t;[action];\t;[service];\t;[op_time];&amp;nbsp;\n</p:valueExpression>
@@ -138,7 +137,7 @@
<p:maatType service="832">
<p:expressions>
<p:keyExpression>EFFECTIVE_RULE;:;{un_maat_table_name};,;[cfg_id]</p:keyExpression>
<p:valueExpression>[cfg_id];\t;[policy_group];\t;[addr_type];\t;[ip];\t;[port];\t;[user_region];\t;[location];\t;[is_valid];\t;[op_time];&amp;nbsp;[service];\t;[action];\n
<p:valueExpression>[cfg_id];\t;[addr_type];\t;[protocol];\t;[ip];\t;[port];\t;[direction];\t;[user_region];\t;[location];\t;[is_valid];\t;[action];\t;[service];\t;[policy_group];\t;[op_time];&amp;nbsp;\n
</p:valueExpression>
</p:expressions>
<p:sequences>

View File

@@ -1,6 +1,6 @@
#################################################################################
####maat格式配置各业务类型对应的编译,分组,域配置等的表名
####1:固定需要写service=业务类型1:动作;业务类型2:动作
####1:固定需要写service=业务类型1:动作;业务类型2:动作 用于验证maat配置service与action对应关系
####2:然后每个业务类型:业务类型1=type1:表名1;type2:表名2;type3:表名3
####3:例如:80=10:MM_COMPILE;11:MM_GROUP;12:AV_CONT_IP_PORT
####4:type中10代表是编译配置,11代表是分组配置,12代表是ip类域配置,13代表是数值类配置,14代表是字符串类域配置,15代表是增强字符串类域配置,16代表是文件摘要类域配置,17代表是文本相似性域配置,18代表是生效范围IP段配置
@@ -56,7 +56,7 @@ service=1:128;2:128;16:16;17:16;18:16;19:16;20:16;21:16;22:16;23:16;24:16;26:16;
#0X20 文件摘要配置
32=10:NTC_COMPILE;11:NTC_GROUP;16:NTC_FILE_DIGEST;18:NTC_IP_RANGE
#0x21 APP阻断
33=10:NTC_COMPILE;11:NTC_GROUP;14:APP_POLICY;18:NTC_IP_RANGE
33=10:NTC_COMPILE;11:NTC_GROUP;12:NTC_UNIVERSAL_IP;13:NTC_UNIVERSAL_PROTO_TYPE;14:APP_POLICY;18:NTC_IP_RANGE
#0x22 P2P阻断
34=10:NTC_COMPILE;11:NTC_GROUP;12:NTC_P2P_IP;14:NTC_P2P_HASH_BIN,NTC_P2P_KEYWORDS;18:NTC_IP_RANGE
@@ -79,7 +79,7 @@ service=1:128;2:128;16:16;17:16;18:16;19:16;20:16;21:16;22:16;23:16;24:16;26:16;
#0x88 OpenVPN监测
136=10:NTC_COMPILE;11:NTC_GROUP;12:NTC_UNIVERSAL_IP;13:NTC_UNIVERSAL_PROTO_TYPE;18:NTC_IP_RANGE
#0x89 IPSec监测
137=10:NTC_COMPILE;11:NTC_GROUP;12:NTC_IP;13:NTC_UNIVERSAL_PROTO_TYPE;18:NTC_IP_RANGE
137=10:NTC_COMPILE;11:NTC_GROUP;12:NTC_UNIVERSAL_IP;13:NTC_UNIVERSAL_PROTO_TYPE;18:NTC_IP_RANGE
#0x8A SSH监测
138=10:NTC_COMPILE;11:NTC_GROUP;12:NTC_UNIVERSAL_IP;13:NTC_UNIVERSAL_PROTO_TYPE;18:NTC_IP_RANGE
#0x8B SOCKS监测
@@ -95,7 +95,7 @@ service=1:128;2:128;16:16;17:16;18:16;19:16;20:16;21:16;22:16;23:16;24:16;26:16;
#0X90 文件摘要监测
144=10:NTC_COMPILE;11:NTC_GROUP;16:NTC_FILE_DIGEST;18:NTC_IP_RANGE
#0x91 APP监测
145=10:NTC_COMPILE;11:NTC_GROUP;14:APP_POLICY;18:NTC_IP_RANGE
145=10:NTC_COMPILE;11:NTC_GROUP;12:NTC_UNIVERSAL_IP;13:NTC_UNIVERSAL_PROTO_TYPE;14:APP_POLICY;18:NTC_IP_RANGE
#0xA0 通联关系监测 monit 无配置
#0xA1 邮件泛收 monit 无配置
#0xA2 RADIUS泛收 monit 无配置
@@ -167,7 +167,8 @@ service=1:128;2:128;16:16;17:16;18:16;19:16;20:16;21:16;22:16;23:16;24:16;26:16;
#0x422 域名限流
1058=10:LIMIT_COMPILE;11:LIMIT_GROUP;14:LIMIT_DOMAIN;18:NTC_IP_RANGE
unMaatService=3:32;4:96;5:32;25:32;28:32;29:32;64:16;65:16;261:16;262:16;263:16;264:16;265:16;266:16;389:1;390:1;391:1;392:1;393:1;394:1;832:96;
#格式业务类型1:动作;业务类型2:动作 用于验证回调类service与action对应关系
unMaatService=3:32;4:96;5:32;25:32;28:32;64:16;65:16;261:16;262:16;263:16;264:16;265:16;266:16;389:1;390:1;391:1;392:1;393:1;394:1;832:96;
#0x03 IP地址丢弃
3=0:INLINE_IP_CB
@@ -180,7 +181,7 @@ unMaatService=3:32;4:96;5:32;25:32;28:32;29:32;64:16;65:16;261:16;262:16;263:16;
#0x1C GRE 丢弃
28=0:INLINE_IP_CB
#0x1D IPSEC丢弃
29=0:INLINE_IP_CB
#29=0:INLINE_IP_CB
#0x40 DNS欺骗配置(回调)
64=0:NTC_DNS_FAKE_IP_CB
@@ -244,7 +245,7 @@ unMaatService=3:32;4:96;5:32;25:32;28:32;29:32;64:16;65:16;261:16;262:16;263:16;
#0x19 IPSec丢弃 25:2,7;
#0x340 IP复用地址池配置回调832:2,4,7
##########
serviceDBIndex=1:2,3,4,6,7;2:2,3,4,6,7;16:2;17:2;18:2;19:2;20:2;21:2;22:2;23:2;24:2;26:2;27:2;30:2;31:2;32:2;33:2,6,7;34:2;128:2;129:2;130:2;131:2;132:2;133:2;134:2;135:2;136:2;137:2;138:2;139:2;140:2;141:2;143:2;144:2;145:2,6,7;256:3;257:3;258:3;259:3;260:3;384:3;385:3;386:3;387:3;388:3;512:4,7;513:4,2,7;528:4;529:4;544:4;545:4;560:4;561:4;768:4;848:2;1024:2,6,7;1025:2;1026:2,6,7;1027:2;1028:2,6,7;1040:2,6,7;1056:2,6,7;1057:6,7;1058:6,2,7;3:2,7;4:2,7;5:2;25:2,7;28:2,7;29:2;64:2;65:2;261:3;262:3;263:3;264:3;265:3;266:3;389:3;390:3;391:3;392:3;393:3;394:3;832:2,4,7
serviceDBIndex=1:2,3,4,6,7;2:2,3,4,6,7;16:2;17:2;18:2;19:2;20:2;21:2;22:2;23:2;24:2;26:2;27:2;30:2;31:2;32:2;33:2,6,7;34:2;128:2;129:2;130:2;131:2;132:2;133:2;134:2;135:2;136:2;137:2;138:2;139:2;140:2;141:2;143:2;144:2;145:2,6,7;256:3;257:3;258:3;259:3;260:3;384:3;385:3;386:3;387:3;388:3;512:4,7;513:4,2,7;528:4;529:4;544:4;545:4;560:4;561:4;768:4;848:2;1024:2,6,7;1025:2;1026:2,6,7;1027:2;1028:2,6,7;1040:2,6,7;1056:2,6,7;1057:6,7;1058:6,2,7;3:2,7;4:2,7;5:2;25:2,7;28:2,7;64:2;65:2;261:3;262:3;263:3;264:3;265:3;266:3;389:3;390:3;391:3;392:3;393:3;394:3;832:2,4,7
##maat配置入阀门需要将编译中的部分参数写到域配置中目前最多包含ACTIONSERVICEUSER_REGION三个属性
@@ -262,5 +263,5 @@ serviceDBIndex=1:2,3,4,6,7;2:2,3,4,6,7;16:2;17:2;18:2;19:2;20:2;21:2;22:2;23:2;2
#0x420 APP限流 1056
#0x421 IP限流 1057
#0x422 域名限流 1058
maat2Valve=33:strRegion@ACTION&SERVICE&USER_REGION;145:strRegion@ACTION&SERVICE&USER_REGION;512:ipRegion@ACTION&SERVICE;513:strRegion@ACTION&SERVICE&USER_REGION;1024:strRegion|strStrRegion@USER_REGION;1026:strRegion|strStrRegion@USER_REGION;1028:ipRegion@ACTION&SERVICE&USER_REGION;1040:strRegion@ACTION&SERVICE&USER_REGION;1056:strRegion@ACTION&SERVICE&USER_REGION;1057:ipRegion@ACTION&SERVICE&USER_REGION;1058:strRegion@ACTION&SERVICE&USER_REGION
maat2Valve=33:strRegion@ACTION&SERVICE&USER_REGION;145:strRegion@ACTION&SERVICE&USER_REGION;512:ipRegion@ACTION&SERVICE;513:strRegion@ACTION&SERVICE&USER_REGION;1024:strRegion|strStrRegion@USER_REGION;1026:strRegion|strStrRegion@USER_REGION;1028:ipRegion@USER_REGION;1040:strRegion@ACTION&SERVICE&USER_REGION;1056:strRegion@ACTION&SERVICE&USER_REGION;1057:ipRegion@ACTION&SERVICE;1058:strRegion@ACTION&SERVICE&USER_REGION

View File

@@ -12,6 +12,8 @@ NtcSshLogHiveTable=NTC_SSH_LOG
NtcFtpLogHiveTable=NTC_FTP_LOG
NtcAppLogHiveTable=NTC_APP_LOG
NtcDdosLogHiveTable=NTC_DDOS_LOG
DkBehaviorLogHiveTable=DK_BEHAVIOR_LOG