ALIYUN::DDoS::Policy は、軽減ポリシーを作成するために使用されます。
構文
{
"Type": "ALIYUN::DDoS::Policy",
"Properties": {
"PolicyName": String,
"Type": String,
"ActionType": String,
"BlackIpList": List,
"Content": Map,
"WhiteIpList": List
}
}プロパティ
プロパティ | タイプ | 必須 | 編集可能 | 説明 | 制約 |
PolicyName | String | はい | はい | ポリシーの名前。 | なし。 |
Type | String | はい | いいえ | ポリシーのタイプ。 | 有効な値:
|
ActionType | String | いいえ | いいえ | アクションのタイプ。 | 有効な値:
|
BlackIpList | List | いいえ | いいえ | ブラックリスト内の IP アドレス。 | ブラックリストには最大 1,999 個の IP アドレスを含めることができます。 |
Content | Map | いいえ | はい | ポリシーの内容。 | 詳細については、「Content プロパティ」をご参照ください。 |
WhiteIpList | List | いいえ | いいえ | ホワイトリスト内の IP アドレス。 | ホワイトリストには最大 1,999 個の IP アドレスを含めることができます。 |
Content 構文
"Content": {
"WhitenGfbrNets": Boolean,
"PortRuleList": List,
"RegionBlockCountryList": List,
"RegionBlockProvinceList": List,
"FingerPrintRuleList": List,
"SourceLimit": Map,
"EnableDefense": Boolean,
"EnableIntelligence": Boolean,
"SourceBlockList": List,
"EnableDropIcmp": Boolean,
"IntelligenceLevel": String,
"ReflectBlockUdpPortList": List,
"BlackIpListExpireAt": Integer,
"Layer4RuleList": List
}Content プロパティ
プロパティ | タイプ | 必須 | 編集可能 | 説明 | 制約 |
BlackIpListExpireAt | Integer | いいえ | はい | IP アドレスブラックリストの有効期限。 | なし。 |
EnableDefense | Boolean | いいえ | はい | ポート特定の軽減を有効にするかどうかを指定します。 | なし。 |
EnableIntelligence | Boolean | いいえ | はい | インテリジェント保護を有効にするかどうかを指定します。 | なし。 |
EnableDropIcmp | Boolean | いいえ | はい | ICMP ブロックを有効にするかどうかを指定します。 | なし。 |
FingerPrintRuleList | List | いいえ | はい | バイトマッチフィルタールール。 | 最大 8 つのルールを設定できます。詳細については、「FingerPrintRuleList プロパティ」をご参照ください。 |
IntelligenceLevel | String | いいえ | はい | インテリジェント保護のレベル。 | 有効な値:
|
Layer4RuleList | List | いいえ | はい | ポート特定の軽減ルール。 | 最大 8 つのルールを設定できます。詳細については、「Layer4RuleList プロパティ」をご参照ください。 |
PortRuleList | List | いいえ | はい | ポートブロックルール。 | 最大 8 つのルールを設定できます。詳細については、「PortRuleList プロパティ」をご参照ください。 |
RegionBlockCountryList | List | いいえ | はい | ロケーションブラックリストに含まれる国。 | なし。 |
RegionBlockProvinceList | List | いいえ | はい | ロケーションブラックリストに含まれる省。 | なし。 |
ReflectBlockUdpPortList | List | いいえ | はい | UDP リフレクション攻撃のフィルタリングポリシーによってトラフィックが除外されるポート。 | 例: {'Length': {'Min': 0, 'Max': 20}}. |
SourceLimit | Map | いいえ | はい | ソースレート制限の設定。 | 詳細については、「SourceLimit プロパティ」をご参照ください。 |
SourceBlockList | List | いいえ | はい | ソースレート制限のためにブラックリストに追加されるソース IP アドレス。 | 詳細については、「SourceBlockList プロパティ」をご参照ください。 |
WhitenGfbrNets | Boolean | いいえ | はい | Anti-DDoS Proxy のオリジン復帰 CIDR ブロックをホワイトリストに追加するかどうかを指定します。 | なし。 |
PortRuleList 構文
"PortRuleList": [
{
"SrcPortEnd": Integer,
"SeqNo": Integer,
"SrcPortStart": Integer,
"PortRuleId": String,
"DstPortStart": Integer,
"DstPortEnd": Integer,
"Protocol": String
}
]PortRuleList プロパティ
プロパティ | タイプ | 必須 | 編集可能 | 説明 | 制約 |
DstPortStart | Integer | はい | はい | 宛先ポート範囲の開始値。 | 有効な値: 0 ~ 65535。 |
DstPortEnd | Integer | はい | はい | 宛先ポート範囲の終了値。 | 有効な値: 0 ~ 65535。 |
Protocol | String | はい | はい | プロトコルのタイプ。 | 有効な値:
|
SrcPortEnd | Integer | はい | はい | 送信元ポート範囲の終了値。 | 有効な値: 0 ~ 65535。 |
SeqNo | Integer | はい | はい | ポートブロックルールが有効になる順序を示すシーケンス番号。 | 説明 数値が小さいほど、優先度が高くなります。 |
SrcPortStart | Integer | はい | はい | 送信元ポート範囲の開始値。 | 有効な値: 0 ~ 65535。 |
PortRuleId | String | いいえ | はい | ポートブロックルールの ID。 | なし。 |
FingerPrintRuleList 構文
"FingerPrintRuleList": [
{
"SrcPortEnd": Integer,
"SeqNo": Integer,
"SrcPortStart": Integer,
"FingerPrintRuleId": String,
"RateValue": Integer,
"PayloadBytes": String,
"DstPortStart": Integer,
"MatchAction": String,
"Offset": Integer,
"MaxPktLen": Integer,
"MinPktLen": Integer,
"DstPortEnd": Integer,
"Protocol": String
}
]FingerPrintRuleList プロパティ
プロパティ | タイプ | 必須 | 編集可能 | 説明 | 制約 |
DstPortStart | Integer | はい | はい | 宛先ポート範囲の開始値。 | 有効な値: 0 ~ 65535。 |
DstPortEnd | Integer | はい | はい | 宛先ポート範囲の終了値。 | 有効な値: 0 ~ 65535。 |
MatchAction | String | はい | はい | バイトマッチフィルタールールが一致した場合にトリガーされるアクション。 | 有効な値:
|
MaxPktLen | Integer | はい | はい | 最大パケット長。 | 有効な値: 1 ~ 1500。 |
MinPktLen | Integer | はい | はい | 最小パケット長。 | 有効な値: 1 ~ 1500。 |
Protocol | String | はい | はい | プロトコルのタイプ。 | 有効な値:
|
SrcPortEnd | Integer | はい | はい | 送信元ポート範囲の終了値。 | 有効な値: 0 ~ 65535。 |
SeqNo | Integer | はい | はい | バイトマッチフィルタールールが有効になる順序を示すシーケンス番号。 | このプロパティの値は整数である必要があります。 説明 数値が小さいほど、優先度が高くなります。 |
SrcPortStart | Integer | はい | はい | 送信元ポート範囲の開始値。 | 有効な値: 0 ~ 65535。 |
FingerPrintRuleId | String | いいえ | はい | バイトマッチフィルタールールの ID。 | なし。 |
Offset | Integer | いいえ | はい | オフセット。 | 有効な値: 0 ~ 1500。 |
PayloadBytes | String | いいえ | はい | ペイロード。 | なし。 |
RateValue | Integer | いいえ | はい | レート制限。 | 有効な値: 1 ~ 100000。 説明 MatchAction が ip_rate または session_rate に設定されている場合、このプロパティを指定する必要があります。 |
SourceLimit 構文
"SourceLimit": {
"Pps": Integer,
"SynBps": Integer,
"Bps": Integer,
"SynPps": Integer
}SourceLimit プロパティ
プロパティ | タイプ | 必須 | 編集可能 | 説明 | 制約 |
Bps | Integer | いいえ | はい | 送信元 IP アドレスの帯域幅制限。 | 単位: BPS。 |
Pps | Integer | いいえ | はい | 送信元 IP アドレスの 1 秒あたりのパケット数 (pps) 制限。 | 単位: pps。 |
SynBps | Integer | いいえ | はい | 送信元 SYN パケットの帯域幅制限。 | 単位: BPS。 |
SynPps | Integer | いいえ | はい | 送信元 SYN パケットの pps 制限。 | 単位: pps。 |
SourceBlockList 構文
"SourceBlockList": [
{
"Type": Integer,
"ExceedLimitTimes": Integer,
"EverySeconds": Integer,
"BlockExpireSeconds": Integer
}
]SourceBlockList プロパティ
プロパティ | タイプ | 必須 | 編集可能 | 説明 | 制約 |
BlockExpireSeconds | Integer | はい | はい | 送信元 IP アドレスが追加されるブラックリストの有効期間。 | 単位: 秒。 |
ExceedLimitTimes | Integer | はい | はい | 送信元 IP アドレスが統計期間内に制限を超えた回数。 | なし。 |
EverySeconds | Integer | はい | はい | システムが送信元 IP アドレスに関するデータを収集して、送信元 IP アドレスをブラックリストに追加するかどうかを判断する統計期間。 | 単位: 秒。 |
Type | Integer | はい | はい | ソースレート制限のタイプ。 | 有効な値:
|
Layer4RuleList 構文
"Layer4RuleList": [
{
"Action": String,
"ConditionList": List,
"Priority": Integer,
"Method": String,
"Limited": Integer,
"Name": String,
"Match": String
}
]Layer4RuleList プロパティ
プロパティ | タイプ | 必須 | 編集可能 | 説明 | 制約 |
Action | String | はい | はい | アクション。 | 有効な値:
|
ConditionList | List | はい | はい | 一致条件。 | 詳細については、「ConditionList プロパティ」をご参照ください。 |
Limited | Integer | はい | はい | 一致をトリガーするセッションの最小バイト数。 | 有効な値: 0 ~ 2048。 |
Method | String | はい | はい | ルールのタイプ。 | 有効な値:
|
Match | String | はい | はい | ルールで指定されたアクションが実行される条件。 | 有効な値:
|
Name | String | はい | はい | ルールの名前。 | なし。 |
Priority | Integer | はい | はい | ルールの優先度。 | 有効な値: 1 ~ 100。 説明 値が小さいほど、優先度が高くなります。 |
ConditionList 構文
"ConditionList": [
{
"Position": Integer,
"Arg": String,
"Depth": Integer
}
]ConditionList プロパティ
プロパティ | タイプ | 必須 | 編集可能 | 説明 | 制約 |
Arg | String | はい | はい | 一致に使用される用語。 | 説明 Method を char に設定した場合、Arg の値は ASCII 文字列である必要があります。 Method を hex に設定した場合、Arg の値は 16 進数文字列である必要があります。用語の長さは最大 2,048 文字です。 |
Depth | Integer | はい | はい | 開始位置から一致までのバイト数。 | 有効な値: 1 ~ 2048。 |
Position | Integer | はい | はい | 一致の開始位置。 | 有効な値: 0 ~ 2047。 |
戻り値
Fn::GetAtt
Type: ポリシーのタイプ。
Content: ポリシーの内容。
PolicyName: ポリシーの名前。
PolicyId: ポリシーの ID。
例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
PolicyName:
Description:
en: The name of the policy.
Required: true
Type: String
Default: test_policy_312
Resources:
ExtensionResource:
Properties:
Content:
EnableIntelligence: true
SourceBlockList:
- Type: 4
ExceedLimitTimes: 5
EverySeconds: 60
BlockExpireSeconds: 1200
- Type: 3
ExceedLimitTimes: 5
EverySeconds: 60
BlockExpireSeconds: 2400
- Type: 6
ExceedLimitTimes: 5
EverySeconds: 60
BlockExpireSeconds: 3360
- Type: 5
ExceedLimitTimes: 5
EverySeconds: 60
BlockExpireSeconds: 180
EnableDropIcmp: true
PortRuleList:
- SrcPortEnd: 65535
SrcPortStart: 0
SeqNo: 1
DstPortStart: 0
DstPortEnd: 65535
MatchAction: drop
Protocol: udp
- SrcPortEnd: 65535
SrcPortStart: 333
SeqNo: 2
DstPortStart: 666
DstPortEnd: 65535
MatchAction: drop
Protocol: tcp
IntelligenceLevel: weak
RegionBlockProvinceList:
- 11
ReflectBlockUdpPortList:
- 137
- 99
- 916
FingerPrintRuleList:
- SrcPortEnd: 65535
SrcPortStart: 56
SeqNo: 1
PayloadBytes: '16'
RateValue: 100
DstPortStart: 69
MatchAction: ip_rate
Offset: 56
MaxPktLen: 33
DstPortEnd: 65535
MinPktLen: 2
Protocol: tcp
SourceLimit:
Pps: 66
SynBps: 1024
Bps: 1024
SynPps: 66
BlackIpListExpireAt: 1734489860
PolicyName:
Ref: PolicyName
Type: ALIYUN::DDoS::Policy
Outputs:
Content:
Description: Configuration Content.
Value:
Fn::GetAtt:
- ExtensionResource
- Content
PolicyId:
Description: The ID of the policy.
Value:
Fn::GetAtt:
- ExtensionResource
- PolicyId
PolicyName:
Description: The name of the policy.
Value:
Fn::GetAtt:
- ExtensionResource
- PolicyName
Type:
Description: The type of the policy.
Value:
Fn::GetAtt:
- ExtensionResource
- Type
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"PolicyName": {
"Description": {
"en": "The name of the policy."
},
"Required": true,
"Type": "String",
"Default": "test_policy_312"
}
},
"Resources": {
"ExtensionResource": {
"Properties": {
"Content": {
"EnableIntelligence": true,
"SourceBlockList": [
{
"Type": 4,
"ExceedLimitTimes": 5,
"EverySeconds": 60,
"BlockExpireSeconds": 1200
},
{
"Type": 3,
"ExceedLimitTimes": 5,
"EverySeconds": 60,
"BlockExpireSeconds": 2400
},
{
"Type": 6,
"ExceedLimitTimes": 5,
"EverySeconds": 60,
"BlockExpireSeconds": 3360
},
{
"Type": 5,
"ExceedLimitTimes": 5,
"EverySeconds": 60,
"BlockExpireSeconds": 180
}
],
"EnableDropIcmp": true,
"PortRuleList": [
{
"SrcPortEnd": 65535,
"SrcPortStart": 0,
"SeqNo": 1,
"DstPortStart": 0,
"DstPortEnd": 65535,
"MatchAction": "drop",
"Protocol": "udp"
},
{
"SrcPortEnd": 65535,
"SrcPortStart": 333,
"SeqNo": 2,
"DstPortStart": 666,
"DstPortEnd": 65535,
"MatchAction": "drop",
"Protocol": "tcp"
}
],
"IntelligenceLevel": "weak",
"RegionBlockProvinceList": [
11
],
"ReflectBlockUdpPortList": [
137,
99,
916
],
"FingerPrintRuleList": [
{
"SrcPortEnd": 65535,
"SrcPortStart": 56,
"SeqNo": 1,
"PayloadBytes": "16",
"RateValue": 100,
"DstPortStart": 69,
"MatchAction": "ip_rate",
"Offset": 56,
"MaxPktLen": 33,
"DstPortEnd": 65535,
"MinPktLen": 2,
"Protocol": "tcp"
}
],
"SourceLimit": {
"Pps": 66,
"SynBps": 1024,
"Bps": 1024,
"SynPps": 66
},
"BlackIpListExpireAt": 1734489860
},
"PolicyName": {
"Ref": "PolicyName"
}
},
"Type": "ALIYUN::DDoS::Policy"
}
},
"Outputs": {
"Content": {
"Description": "構成コンテンツ。",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Content"
]
}
},
"PolicyId": {
"Description": "ポリシーの ID。",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"PolicyId"
]
}
},
"PolicyName": {
"Description": "ポリシーの名前。",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"PolicyName"
]
}
},
"Type": {
"Description": "ポリシーのタイプ。",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Type"
]
}
}
}
}