![](/img/trans.png)
[英]Is it possible to delete the aws Security Group Default Egress allow all Rule with Cloudformation?
[英]AWS Cloudformation: Security Group Rule to allow all egress
我在cloudformation
模板的安全組定義中使用以下出口規則
SecurityGroupEgress:
- IpProtocol: tcp
FromPort: 0
ToPort: 65535
CidrIp: 0.0.0.0/0
然而,這並沒有最終形成一個允許所有出站流量的規則;
定義allow-all-outbound
規則的正確方法是什么?
這是一個舊線程,但人們仍然在搜索中找到它......確實,有時默認值不能很好地工作,例如在使用 cfn_nag_scan 掃描 cft 時。
這是您要尋找的內容:
SecurityGroupEgress:
- Description: Allow all outbound traffic
IpProtocol: "-1"
CidrIp: 0.0.0.0/0
我必須從 AWS 文檔中添加此信息,因為可能不需要定義這樣的策略,
“當您創建 VPC 安全組時,Amazon EC2 會創建一個默認出口規則,允許所有端口和 IP 協議上的出口流量到達任何位置。僅當您指定一個或多個出口規則時,才會刪除默認規則。”
通常,您定義一些特定的端口/協議。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.