创建安全组规则
<p class="shortdesc">您可以对安全组创建规则。</p>
<section class="section prereq" id="CreateRule__prereq_b2c_zwq_lvb"><div class="tasklabel"><h2 class="doc-tairway">前提条件</h2></div>
<p class="p">已创建安全组。</p>
</section>
<section><div class="tasklabel"><h2 class="doc-tairway">操作步骤</h2></div><ol class="ol steps"><li class="li step stepexpand">
<span class="ph cmd" id="CreateRule__d21e22">登录<a class="xref" href="/console/dedicatedEcs/host" target="_blank" rel="external noopener">专属服务器DH控制台</a>。</span>
</li><li class="li step stepexpand">
<span class="ph cmd">单击左侧导航栏<span class="ph uicontrol">安全组</span>,进入<span class="ph uicontrol">安全组</span>页面。</span>
</li><li class="li step stepexpand">
<span class="ph cmd">单击目标安全组的名称,进入<span class="ph uicontrol">安全组详情</span>页面。</span>
</li><li class="li step stepexpand">
<span class="ph cmd">切换到<span class="ph uicontrol">安全组规则</span>页签。</span>
</li><li class="li step stepexpand">
<span class="ph cmd">单击页面右上方的<span class="ph uicontrol">添加规则</span>。</span>
</li><li class="li step stepexpand">
<span class="ph cmd">在<span class="ph uicontrol">添加规则</span>页面,填写规则配置信息。</span>
<div class="itemgroup info"><img class="image" id="CreateRule__image_m2s_hxq_lvb" src="https://obs-cn-shanghai.fincloud.pinganyun.com/pacloud/20221011105152-1fb18ca7977f.png" width="700"><table class="table" id="CreateRule__table_spw_jxq_lvb"><caption></caption><colgroup><col><col></colgroup><thead class="thead">
<tr class="row">
<th class="entry" id="CreateRule__table_spw_jxq_lvb__entry__1">
<p class="p">配置项</p>
</th>
<th class="entry" id="CreateRule__table_spw_jxq_lvb__entry__2">
<p class="p">说明</p>
</th>
</tr>
</thead><tbody class="tbody">
<tr class="row">
<td class="entry" headers="CreateRule__table_spw_jxq_lvb__entry__1 ">
<p class="p">规则方向</p>
</td>
<td class="entry" headers="CreateRule__table_spw_jxq_lvb__entry__2 ">
<p class="p">选择安全组方向为出方向<strong class="ph b">OUT</strong>或入方向<strong class="ph b">IN</strong>。</p>
<ul class="ul" id="CreateRule__ul_tpw_jxq_lvb">
<li class="li"><strong class="ph b">出方向:</strong>表示允许安全组内的云主机实例访问授权IP地址。</li>
<li class="li"><strong class="ph b">入方向:</strong>表示允许授权IP地址访问安全组内的云主机实例。</li>
</ul>
</td>
</tr>
<tr class="row">
<td class="entry" headers="CreateRule__table_spw_jxq_lvb__entry__1 ">
<p class="p">授权策略</p>
</td>
<td class="entry" headers="CreateRule__table_spw_jxq_lvb__entry__2 ">
<p class="p">选择安全组规则授权的地址为<strong class="ph b">允许</strong>访问或<strong class="ph b">拒绝</strong>访问。</p>
</td>
</tr>
<tr class="row">
<td class="entry" headers="CreateRule__table_spw_jxq_lvb__entry__1 ">
<p class="p">协议类型</p>
</td>
<td class="entry" headers="CreateRule__table_spw_jxq_lvb__entry__2 ">
<p class="p">选择网络协议类型,目前支持全部、TCP、UDP和其他一些常见的协议。</p>
</td>
</tr>
<tr class="row">
<td class="entry" headers="CreateRule__table_spw_jxq_lvb__entry__1 ">
<p class="p">端口范围</p>
</td>
<td class="entry" headers="CreateRule__table_spw_jxq_lvb__entry__2 ">
<p class="p">如果协议选择TCP或UDP,还需要输入端口范围。</p>
</td>
</tr>
<tr class="row">
<td class="entry" headers="CreateRule__table_spw_jxq_lvb__entry__1 ">
<p class="p">优先级</p>
</td>
<td class="entry" headers="CreateRule__table_spw_jxq_lvb__entry__2 ">
<p class="p">定义该安全组规则的优先级。</p>
<p class="p"><strong class="ph b">说明:</strong></p>
<ul class="ul" id="CreateRule__ul_upw_jxq_lvb">
<li class="li">优先级的选择范围为:1-10。</li>
<li class="li">优先级数字越小,优先级越高。</li>
</ul>
</td>
</tr>
<tr class="row">
<td class="entry" headers="CreateRule__table_spw_jxq_lvb__entry__1 ">
<p class="p">授权IP</p>
</td>
<td class="entry" headers="CreateRule__table_spw_jxq_lvb__entry__2 ">
<p class="p">输入授权IP地址。</p>
</td>
</tr>
<tr class="row">
<td class="entry" headers="CreateRule__table_spw_jxq_lvb__entry__1 ">
<p class="p">描述</p>
</td>
<td class="entry" headers="CreateRule__table_spw_jxq_lvb__entry__2 ">
<p class="p">自定义该安全组规则的描述。</p>
</td>
</tr>
</tbody></table><div class="note note note_note" id="CreateRule__note_tyh_jxq_lvb"><span class="note__title">说明:</span> 如果两条安全组规则的协议类型、端口范围、授权IP、优先级都相同,那么拒绝的策略优先生效,允许的策略不生效。</div></div>
</li><li class="li step stepexpand">
<span class="ph cmd">单击<span class="ph uicontrol">确认</span>完成安全组规则创建。</span>
</li></ol></section>
提交成功!非常感谢您的反馈,我们会继续努力做到更好!