

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 使用服務控制政策，防止帳戶層級的網際網路存取
<a name="prevent-internet-access-at-the-account-level-by-using-a-service-control-policy"></a>

*Sergiy Shevchenko、Sean O'Sullivan 和 Victor Mazeo Whitaker，Amazon Web Services*

## 總結
<a name="prevent-internet-access-at-the-account-level-by-using-a-service-control-policy-summary"></a>

組織經常想要限制應保持私有之帳戶資源的網際網路存取。在這些帳戶中，虛擬私有雲端 (VPCs) 中的資源不應以任何方式存取網際網路。許多組織選擇[集中式檢查架構](https://aws.amazon.com/blogs/networking-and-content-delivery/centralized-inspection-architecture-with-aws-gateway-load-balancer-and-aws-transit-gateway/)。對於集中式檢查架構中的東西 (VPC-to-VPC) 流量，您需要確保輻條帳戶及其資源無法存取網際網路。對於南北 （網際網路輸出和內部部署） 流量，您想要僅允許透過檢查 VPC 存取網際網路。

此模式使用[服務控制政策 (SCP)](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps.html) 來協助防止網際網路存取。您可以在帳戶或組織單位 (OU) 層級套用此 SCP。SCP 會阻止下列項目來限制網際網路連線：
+ 建立或連接允許直接網際網路存取 VPC 的 IPv4 或 IPv6 網際網路[閘道](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Internet_Gateway.html) 
+ 建立或接受可能允許透過另一個 [VPC 間接網際網路存取的 VPC 互連連線](https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html) 
+ 建立或更新可能允許直接網際網路存取 VPC 資源的[AWS Global Accelerator](https://docs.aws.amazon.com/global-accelerator/latest/dg/what-is-global-accelerator.html)組態

## 先決條件和限制
<a name="prevent-internet-access-at-the-account-level-by-using-a-service-control-policy-prereqs"></a>

**先決條件**
+ 以組織 AWS 帳戶 身分管理的一或多個 AWS Organizations。
+ 在 中[啟用所有功能](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html) AWS Organizations。
+ [SCPs會在組織中啟用](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_enable-disable.html)。
+ 許可：
  + 存取組織的管理帳戶。
  + 建立 SCPs。如需最低許可的詳細資訊，請參閱[建立 SCP](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps_create.html#create-an-scp)。
  + 將 SCP 連接到目標帳戶或組織單位 OUs)。如需最低許可的詳細資訊，請參閱[連接和分離服務控制政策](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps_attach.html)。

**限制**
+ SCP 不會影響管理帳戶中的使用者或角色。它們只會影響組織中的成員帳戶。
+ SCPs僅影響由屬於組織一部分的帳戶管理的 AWS Identity and Access Management (IAM) 使用者和角色。如需詳細資訊，請參閱 [SCP 對許可的影響](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps.html#scp-effects-on-permissions)。

## 工具
<a name="prevent-internet-access-at-the-account-level-by-using-a-service-control-policy-tools"></a>

**AWS 服務**
+ [AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_introduction.html) 是一種帳戶管理服務，可協助您將多個 合併 AWS 帳戶 到您建立並集中管理的組織。在此模式中，您會在 中使用[服務控制政策 SCPs)](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps.html) AWS Organizations。
+ [Amazon Virtual Private Cloud (Amazon VPC)](https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html) 可協助您在已定義的虛擬網路中啟動 AWS 資源。此虛擬網路與您在自己的資料中心中操作的傳統網路相似，且具備使用 AWS可擴展基礎設施的優勢。

## 最佳實務
<a name="prevent-internet-access-at-the-account-level-by-using-a-service-control-policy-best-practices"></a>

在您的組織中建立此 SCP 之後，請務必經常更新它，以解決可能影響網際網路存取的任何新 AWS 服務 或 功能。

## 史詩
<a name="prevent-internet-access-at-the-account-level-by-using-a-service-control-policy-epics"></a>

### 建立並連接 SCP
<a name="create-and-attach-the-scp"></a>


| 任務 | Description | 所需的技能 | 
| --- | --- | --- | 
| 建立 SCP。 | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/prescriptive-guidance/latest/patterns/prevent-internet-access-at-the-account-level-by-using-a-service-control-policy.html) | AWS 管理員 | 
| 連接 SCP。 | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/prescriptive-guidance/latest/patterns/prevent-internet-access-at-the-account-level-by-using-a-service-control-policy.html) | AWS 管理員 | 

## 相關資源
<a name="prevent-internet-access-at-the-account-level-by-using-a-service-control-policy-resources"></a>
+ [AWS Organizations 文件](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_introduction.html)
+ [服務控制政策 (SCP)](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_introduction.html)
+ [使用 AWS Gateway Load Balancer 和 （部落格文章） 的集中式檢查架構 AWS Transit Gateway](https://aws.amazon.com/blogs/networking-and-content-delivery/centralized-inspection-architecture-with-aws-gateway-load-balancer-and-aws-transit-gateway/)AWS 