我想允許 AWS Client VPN 使用者透過靜態公有 IP 地址存取網際網路。
解決方法
請依照下列指示以建立公有 NAT 閘道,並允許 Client VPN 使用者存取網際網路。
**注意:**您建立 NAT 閘道時,此動作會產生額外的 AWS 費用。如需詳細資訊,請參閱 NAT 閘道定價。
-
確定 Amazon Virtual Private Cloud (Amazon VPC) 有私有和公有子網路。若要建立 Amazon VPC 和子網路,請參閱 VPC 的子網路。
-
依照指示以建立 NAT 閘道 (具有公用子網路)。系統會指定彈性 IP 地址到 NAT 閘道。例如:
Route table for the public subnet associated with the NAT gateway:
0.0.0.0/0 Target destination Internet Gateway (IGW)
-
建立 Client VPN 端點與私人子網路的關聯。私有子網路具備透過 NAT 閘道連線至網際網路的路由。例如:
Route table for the private subnet associated with the Client VPN endpoint:
0.0.0.0/0 Target destination nat-abcdbac(NAT Gateway)
-
在 Client VPN 路由表上新增 Client VPN 端點目的地路由 0.0.0.0/0 或目的地的公用 IP 地址範圍。針對目標 VPC 子網路 ID,請選取步驟 3 中的私有子網路。如需詳細資訊,請參閱建立端點路由。
-
新增授權規則以允許存取網際網路 (0.0.0.0/0) 或指定的公用網路 IP 地址。如需詳細資訊,請參閱將授權規則新增至 Client VPN 端點。
-
確認與您路由流量的子網路相關的安全群組允許輸出流量到網際網路。安全群組必須有允許所有流量進入網際網路 (0.0.0.0/0) 的輸出規則。
相關資訊
使用 AWS Client VPN 擴充居家工作的容量