From 93b40199568d503ecd45044bea5aa6fa0354b30e Mon Sep 17 00:00:00 2001 From: zhangdongxu Date: Tue, 13 Nov 2018 20:23:21 +0800 Subject: [PATCH] =?UTF-8?q?ddos=E9=85=8D=E7=BD=AE=E4=BB=8E=E5=9B=9E?= =?UTF-8?q?=E8=B0=83=E7=B1=BB=E6=94=B9=E4=B8=BAmaat=E7=B1=BB=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=EF=BC=8C=20=E5=88=86=E5=8F=91=E5=88=B0=E9=97=A8?= =?UTF-8?q?=E9=98=80=E5=B9=B6=E9=A2=9D=E5=A4=96=E6=B7=BB=E5=8A=A0compile?= =?UTF-8?q?=5Fid=E5=92=8Cuser=5Fregion=E4=B8=A4=E4=B8=AA=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E5=88=B0=E5=9F=9F=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/applicationConfig-rule.properties | 16 +++++++++------- .../maatXml/applicationConfig-maatRedis.xml | 5 +++-- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/main/resources/applicationConfig-rule.properties b/src/main/resources/applicationConfig-rule.properties index d1da0f8..0419b45 100644 --- a/src/main/resources/applicationConfig-rule.properties +++ b/src/main/resources/applicationConfig-rule.properties @@ -20,7 +20,7 @@ ##回流 0x60 96 loop ##白名单 0x80 128 whitelist -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;27:16;30:16;31:16;32:16;33:16;34:16;35:16;36:16;37:16;38:16;39:16;40:16;66:128;128:1;129:1;130:1;131:1;132:1;133:1;134:1;135:1;136:1;137:1;138:1;139:1;140:1;142:1;143:1;144:1;145:1;146:1;147:1;148:1;149:1;150:1;151:1;152:1;256:128;257:128;258:16;259:16;260:16;267:16;271:16;272:16;273:16;384:1;385:1;386:1;387:1;388:1;395:1;399:1;512:1;513:1;514:64;515:64;517:80;521:128;528:48;544:2;560:80;576:16;592:1;624:128;625:48;750:128;768:96;1024:1;1025:1;1026:1;1027:1;1028:1;1029:1;1030:1;1040:32;1041:32;1042:32;1056:64;1057:64;1058:64;1059:64;1060:64;1152:1 +service=1:128;2:128;5:96;16:16;17:16;18:16;19:16;20:16;21:16;22:16;23:16;24:16;26:16;27:16;30:16;31:16;32:16;33:16;34:16;35:16;36:16;37:16;38:16;39:16;40:16;66:128;128:1;129:1;130:1;131:1;132:1;133:1;134:1;135:1;136:1;137:1;138:1;139:1;140:1;142:1;143:1;144:1;145:1;146:1;147:1;148:1;149:1;150:1;151:1;152:1;256:128;257:128;258:16;259:16;260:16;267:16;271:16;272:16;273:16;384:1;385:1;386:1;387:1;388:1;395:1;399:1;512:1;513:1;514:64;515:64;517:80;521:128;528:48;544:2;560:80;576:16;592:1;624:128;625:48;750:128;768:96;1024:1;1025:1;1026:1;1027:1;1028:1;1029:1;1030:1;1040:32;1041:32;1042:32;1056:64;1057:64;1058:64;1059:64;1060:64;1152:1 #0x1E 0x8E 有问题:14:NTC_XMPP_REGION,NTC_XMPP_CONT 无表结构 不确定表是不是字符串类 @@ -28,6 +28,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; 1=10:WHITE_LIST_COMPILE;11:WHITE_LIST_GROUP;12:WHITE_LIST_IP;14:WHITE_LIST_SUBSCRIBE_ID;18:NTC_IP_RANGE #0x02 全局域名白名单 2=10:WHITE_LIST_COMPILE;11:WHITE_LIST_GROUP;14:WHITE_LIST_DOMAIN,WHITE_LIST_SUBSCRIBE_ID;18:NTC_IP_RANGE +#0x05 DDOS流量丢弃 +5=10:NTC_COMPILE;11:NTC_GROUP;12:NTC_DDOS_PROTECT_TARGET_IP;14:NTC_SUBSCRIBE_ID;18:NTC_IP_RANGE #0x10 IP地址阻断 16=10:NTC_COMPILE;11:NTC_GROUP;12:NTC_IP;14:NTC_SUBSCRIBE_ID;18:NTC_IP_RANGE #0x11 HTTP阻断 @@ -236,13 +238,13 @@ 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; 1152=10:APP_COMPILE;11:APP_GROUP;14:APP_TOPIC_DOMAIN,APP_SUBSCRIBE_ID;18:NTC_IP_RANGE #格式:业务类型1:动作;业务类型2:动作 ( 用于验证回调类service与action对应关系 -unMaatService=3:32;4:96;5:32;25:32;28:32;64;65;261:16;262:16;263:16;264:16;265:16;266:16;268:16;269:16;270:16;274:16;389:1;390:1;391:1;392:1;393:1;394:1;396:1;397:1;398:1;520;608;640;641;832 +unMaatService=3:32;4:96;25:32;28:32;64;65;261:16;262:16;263:16;264:16;265:16;266:16;268:16;269:16;270:16;274:16;389:1;390:1;391:1;392:1;393:1;394:1;396:1;397:1;398:1;520;608;640;641;832 #0x03 IP地址丢弃 3=0:INLINE_IP_CB #0x04 IP地址回流 4=0:INLINE_IP_CB -#0x05 DDOS流量丢弃 -5=0:DDOS_PROTECT_TARGET_IP_CB +#0x05 DDOS流量丢弃 5:32; +#5=0:DDOS_PROTECT_TARGET_IP_CB #0x19 IPSec丢弃 25=0:INLINE_IP_CB #0x1C GRE 丢弃 @@ -318,7 +320,7 @@ unMaatService=3:32;4:96;5:32;25:32;28:32;64;65;261:16;262:16;263:16;264:16;265:1 #0x01 全局IP白名单 1:2,4,5;(杨威说不往ysp库下发了,所以就不往3号库里面写了) #0x02 全局域名白名单 2:2,4,5;(杨威说不往ysp库下发了,所以就不往3号库里面写了) #0x42 邮件账号白名单 66:2,4,5;(杨威说不往ysp库下发了,所以就不往3号库里面写了) - +#0x05 DDOS流量丢弃 5:2,5; #0x21 APP阻断 33:2,5; #0x200 PXY拦截IP 512:4,5; #0x201 PXY拦截域名 513:4,2,5; @@ -327,7 +329,7 @@ unMaatService=3:32;4:96;5:32;25:32;28:32;64;65;261:16;262:16;263:16;264:16;265:1 ##回调类配置 #0x340 IP复用地址池配置(回调)832:2,4,5 ########## -serviceDBIndex=1:2,4,5;2:2,4,5;66:2,4,5;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,5;34:2;35:2;36:2;37:2;38:2;39:2;40: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;142:2;143:2;144:2;145:2;146:2;147:2;148:2;149:2;150:2;151:2;152:2;256:2;257:2;258:2;259:2;260:2;267:2;271:2;272:2;273:3;274:5;384:2;385:2;386:2;387:2;388:2;395:2;399:3;512:4,5;513:4,2,5;514:4,5;515:4,5;517:4,5;520:4;521:4;528:4;544:4;560:4;576:4;592:4;608:4;624:4;625:4;640:4;641:4;750:4;768:4;1024:2;1025:2;1026:2,5;1027:2;1028:2,5;1029:2;1030:2;1040:2;1041:2;1042:2;1152:2;3:5;4:5;5:2;25:5;28:5;64:2;65:2;261:3;262:3;263:3;264:3;265:3;266:3;268:3;269:3;270:3;389:3;390:3;391:3;392:3;393:3;394:3;396:3;397:3;398:3;832:2,4,5; +serviceDBIndex=1:2,4,5;2:2,4,5;5:2,5;66:2,4,5;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,5;34:2;35:2;36:2;37:2;38:2;39:2;40: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;142:2;143:2;144:2;145:2;146:2;147:2;148:2;149:2;150:2;151:2;152:2;256:2;257:2;258:2;259:2;260:2;267:2;271:2;272:2;273:3;274:5;384:2;385:2;386:2;387:2;388:2;395:2;399:3;512:4,5;513:4,2,5;514:4,5;515:4,5;517:4,5;520:4;521:4;528:4;544:4;560:4;576:4;592:4;608:4;624:4;625:4;640:4;641:4;750:4;768:4;1024:2;1025:2;1026:2,5;1027:2;1028:2,5;1029:2;1030:2;1040:2;1041:2;1042:2;1152:2;3:5;4:5;25:5;28:5;64:2;65:2;261:3;262:3;263:3;264:3;265:3;266:3;268:3;269:3;270:3;389:3;390:3;391:3;392:3;393:3;394:3;396:3;397:3;398:3;832:2,4,5; ##阀门配置在redisdb的序号 tapRedisDb=5 @@ -343,7 +345,7 @@ tapRedisDb=5 #0x205 基于PXY IP替换 517 #0x402 APP DOMAIN特征发现 1026 #0x404 APP IP特征 1028 -maat2Valve=33:strRegion@ACTION&SERVICE&USER_REGION;512:ipRegion@ACTION&SERVICE&USER_REGION;513:strRegion@ACTION&SERVICE&USER_REGION;514:ipRegion@ACTION&SERVICE&USER_REGION;515:strRegion@ACTION&SERVICE&USER_REGION;517:ipRegion@ACTION&SERVICE&USER_REGION;1026:strRegion|strStrRegion@ACTION&SERVICE&USER_REGION;1028:ipRegion@ACTION&SERVICE&USER_REGION +maat2Valve=33:strRegion@ACTION&SERVICE&USER_REGION;512:ipRegion@ACTION&SERVICE&USER_REGION;513:strRegion@ACTION&SERVICE&USER_REGION;514:ipRegion@ACTION&SERVICE&USER_REGION;515:strRegion@ACTION&SERVICE&USER_REGION;517:ipRegion@ACTION&SERVICE&USER_REGION;1026:strRegion|strStrRegion@ACTION&SERVICE&USER_REGION;1028:ipRegion@ACTION&SERVICE&USER_REGION;5:ipRegion@COMPILE_ID&USER_REGION ##记录哪些service可以被分组复用(只有maat类配置可以被分组复用) #业务ID:域类型1@表名,表名|域类型2@表名;业务ID:域类型1@表名,表名|域类型2@表名 diff --git a/src/main/resources/maatXml/applicationConfig-maatRedis.xml b/src/main/resources/maatXml/applicationConfig-maatRedis.xml index c913c57..9dee8e3 100644 --- a/src/main/resources/maatXml/applicationConfig-maatRedis.xml +++ b/src/main/resources/maatXml/applicationConfig-maatRedis.xml @@ -73,7 +73,7 @@ MAAT_VERSION_TIMER - + @@ -242,7 +243,7 @@ + service="1;2;5;66;16;17;18;19;20;21;22;23;24;26;27;30;31;32;33;34;35;36;37;38;39;40;128;129;130;131;132;133;134;135;136;137;138;139;140;141;142;143;144;145;146;147;148;149;150;151;152;256;257;258;259;260;267;271;272;273;384;385;386;387;388;395;399;512;513;514;515;517;521;528;544;560;576;592;624;625;750;768;848;1024;1025;1026;1027;1028;1029;1030;1040;1041;1042;1056;1057;1058;1059;1060;1152"> EFFECTIVE_RULE;:;{compile_table_name};,;[compile_id] [compile_id];\t;[service];\t;[action];\t;[do_blacklist];\t;[do_log];\t;[effective_range];\t;[user_region];\t;[is_valid];\t;[group_num];\t;[father_cfg_id];\t;[op_time]; 0;\n